12345678910111213141516171819202122232425262728293031323334353637 |
- #pragma once
- #include <boost/unordered_map.hpp>
- #include <vector>
- struct Fish_DropGoldCFGData
- {
- //ID
- int mID;
- //资源类型
- int mResType;
- //资源名字
- std::string mResName;
- //资源路径
- std::string mResPath;
- //宽度
- int mWidth;
- //高度
- int mHeight;
- //缩放
- float mScale;
- };
- class Fish_DropGoldCFG
- {
- public:
- private:
- static std::auto_ptr<Fish_DropGoldCFG> msSingleton;
- public:
- int GetCount();
- const Fish_DropGoldCFGData* GetData(int ID);
- boost::unordered_map<int, Fish_DropGoldCFGData>& GetMapData();
- void Reload();
- void Load(const std::string& path);
- void Load();
- static Fish_DropGoldCFG* GetSingleton();
- private:
- boost::unordered_map<int, Fish_DropGoldCFGData> mMapData;
- };
|