levelinputdata.h 631 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef LEVELINPUTDATA_H
  2. #define LEVELINPUTDATA_H
  3. //一个关卡的输入参数类
  4. #include "ajson5.hpp"
  5. #include <string>
  6. #include <vector>
  7. using std::vector;
  8. using std::string;
  9. struct LevelInputData
  10. {
  11. public:
  12. LevelInputData();
  13. bool readFromFile(string filename) ;
  14. bool writeToFile(string filename) ;
  15. public:
  16. struct JewelInputData {
  17. int _jewelId ;
  18. int _count ;//宝石个数
  19. } ;
  20. public:
  21. int _id ;
  22. int _subid ;
  23. string _name ;// 1997_A_01_01
  24. int _time ;
  25. int _difficulty ;//0-normal 1-hard 2-veryhard
  26. vector<JewelInputData> _jewels ;
  27. };
  28. #endif // LEVELINPUTDATA_H