Fish_DropGoldCFG.h 637 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #pragma once
  2. #include <map>
  3. struct Fish_DropGoldCFGData
  4. {
  5. //ID
  6. int mID;
  7. //资源类型
  8. int mResType;
  9. //资源名字
  10. std::string mResName;
  11. //资源路径
  12. std::string mResPath;
  13. //宽度
  14. int mWidth;
  15. //高度
  16. int mHeight;
  17. //缩放
  18. float mScale;
  19. };
  20. class Fish_DropGoldCFG
  21. {
  22. public:
  23. private:
  24. static std::auto_ptr<Fish_DropGoldCFG> msSingleton;
  25. public:
  26. int GetCount();
  27. const Fish_DropGoldCFGData* GetData(int ID);
  28. const std::map<int, Fish_DropGoldCFGData>& GetMapData();
  29. void Load();
  30. void LoadLua();
  31. void Reload();
  32. static Fish_DropGoldCFG* GetSingleton();
  33. static void Release();
  34. private:
  35. std::map<int, Fish_DropGoldCFGData> mMapData;
  36. };