M_RobotsCFG.h 694 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #pragma once
  2. #include <map>
  3. struct M_RobotsCFGData
  4. {
  5. //编号
  6. int mID;
  7. //排行类型
  8. int mRankingTyep;
  9. //上榜时间
  10. std::vector<int> mTime;
  11. //机器人数量
  12. std::vector<int> mNumberOfRobots;
  13. //最小积分
  14. int mMin;
  15. //最大积分
  16. int mMax;
  17. //最小生成历史条数
  18. int mCreateHisCountMin;
  19. //最大生成历史条数
  20. int mCreateHisCountMax;
  21. };
  22. class M_RobotsCFG
  23. {
  24. public:
  25. private:
  26. static std::auto_ptr<M_RobotsCFG> msSingleton;
  27. public:
  28. int GetCount();
  29. const M_RobotsCFGData* GetData(int ID);
  30. const std::map<int, M_RobotsCFGData>& GetMapData();
  31. void Load();
  32. void LoadLua();
  33. void Reload();
  34. static M_RobotsCFG* GetSingleton();
  35. static void Release();
  36. private:
  37. std::map<int, M_RobotsCFGData> mMapData;
  38. };