12345678910111213141516171819202122232425262728293031323334353637 |
- #ifndef LEVELINPUTDATA_H
- #define LEVELINPUTDATA_H
- //一个关卡的输入参数类
- #include "ajson5.hpp"
- #include <string>
- #include <vector>
- using std::vector;
- using std::string;
- struct LevelInputData
- {
- public:
- LevelInputData();
- bool readFromFile(string filename) ;
- bool writeToFile(string filename) ;
- public:
- struct JewelInputData {
- int _jewelId ;
- int _count ;//宝石个数
- } ;
- public:
- int _id ;
- int _subid ;
- string _name ;// 1997_A_01_01
- int _time ;
- int _difficulty ;//0-normal 1-hard 2-veryhard
- vector<JewelInputData> _jewels ;
- };
- #endif // LEVELINPUTDATA_H
|