Odds2_Room.h 638 B

123456789101112131415161718192021222324252627282930313233
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct Odds2_RoomData
  5. {
  6. //·¿¼äID
  7. int mRoomID;
  8. //¼¤¹âÔö¼Ó¼¸ÂÊ
  9. int mLaserAdd;
  10. //¼¤¹â¼õÒæ¼¸ÂÊ
  11. int mLaserReduce;
  12. //ÓãÕóÔö¼Ó¼¸ÂÊ
  13. int mFormationAdd;
  14. //ÓãÕó¼õÉÙ¼¸ÂÊ
  15. int mFormationReduce;
  16. };
  17. class Odds2_Room
  18. {
  19. public:
  20. private:
  21. static std::auto_ptr<Odds2_Room> msSingleton;
  22. public:
  23. int GetCount();
  24. const Odds2_RoomData* GetData(int RoomID);
  25. boost::unordered_map<int, Odds2_RoomData>& GetMapData();
  26. void Reload();
  27. void Load(const std::string& path);
  28. void Load();
  29. static Odds2_Room* GetSingleton();
  30. private:
  31. boost::unordered_map<int, Odds2_RoomData> mMapData;
  32. };