Fish_LargeFishCFG4.h 835 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct Fish_LargeFishCFG4Data
  5. {
  6. //key
  7. int mID;
  8. //鱼阵名字
  9. std::string mName;
  10. //鱼阵ID
  11. int mGeneratorID;
  12. //BOSS鱼ID
  13. int mFishID;
  14. //提示信息
  15. std::string mImageInfo;
  16. //BOSS鱼阵
  17. bool mIsBoss;
  18. //声音
  19. std::string mBackSound;
  20. //倒计时
  21. int mDuration;
  22. //警告时间
  23. int mWarnTime;
  24. //刷水时间
  25. int mFlashTime;
  26. //死亡时间
  27. int mDieTime;
  28. };
  29. class Fish_LargeFishCFG4
  30. {
  31. public:
  32. private:
  33. static std::auto_ptr<Fish_LargeFishCFG4> msSingleton;
  34. public:
  35. int GetCount();
  36. const Fish_LargeFishCFG4Data* GetData(int ID);
  37. boost::unordered_map<int, Fish_LargeFishCFG4Data>& GetMapData();
  38. void Reload();
  39. void Load(const std::string& path);
  40. void Load();
  41. static Fish_LargeFishCFG4* GetSingleton();
  42. private:
  43. boost::unordered_map<int, Fish_LargeFishCFG4Data> mMapData;
  44. };