123456789101112131415161718192021222324252627282930313233343536373839 |
- #pragma once
- #include <boost/unordered_map.hpp>
- #include <vector>
- struct M_skillData
- {
- //ID
- int mID;
- //英雄ID
- int mhero_id;
- //技能等级
- int mskill_leve;
- //子弹数量
- int mbullet_num;
- //子弹半径
- int mbullet_radius;
- //攻击距离
- int mattack_distance;
- //攻击间隔
- float mattack_Interval;
- //技能描述
- std::string mskill_des;
- };
- class M_skill
- {
- public:
- private:
- static std::auto_ptr<M_skill> msSingleton;
- public:
- int GetCount();
- const M_skillData* GetData(int ID);
- boost::unordered_map<int, M_skillData>& GetMapData();
- void Reload();
- void Load(const std::string& path);
- void Load();
- static M_skill* GetSingleton();
- private:
- boost::unordered_map<int, M_skillData> mMapData;
- };
|