levelextinputdata.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef LEVELEXTINPUTDATA_H
  2. #define LEVELEXTINPUTDATA_H
  3. //一个关卡扩展输入参数
  4. #include "ajson5.hpp"
  5. #include <string>
  6. #include <vector>
  7. using std::vector;
  8. using std::string;
  9. struct LevelExtInputData
  10. {
  11. public:
  12. LevelExtInputData();
  13. bool readFromFile(string filename) ;
  14. bool writeToFile(string filename) ;
  15. int _seed ;
  16. int _hasMovement ;
  17. string _firstMoveType ; // A1, B1,B2,B3, C1,C2...
  18. int _firstMoveLyrCnt ;
  19. int _firstMoveDirection; //0-fromRight2Left 1-fromLeft2Right
  20. string _secondMoveType ;
  21. int _secondMoveLyrCnt ;
  22. int _secondMoveDirection ;
  23. int _bigPlatePercent; //不移动盘子中大盘子百分比
  24. int _midPlatePercent; //不移动盘子中中盘子百分比
  25. int _lyr1Percent; //不移动盘子中有一层的盘子百分比
  26. int _lyr2Percent; //不移动盘子中有两层的盘子百分比
  27. int _lyr3Percent; //不移动盘子中有三层的盘子百分比
  28. int _matchLyr1; //第一层可配百分比,第一层是点击层、第二层是可见层、第三层为隐藏层
  29. int _matchLyr2; //第二层可配百分比
  30. int _matchLyr3; //第三层可配百分比
  31. //将关卡输入数据文件名转换为扩展参数文件名 Level9999_99.json to Level9999_99_ext.json
  32. string levelInputFilename2ExtFilename( string levelInputFilename ) ;
  33. };
  34. #endif // LEVELEXTINPUTDATA_H