M_skill.h 653 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct M_skillData
  5. {
  6. //ID
  7. int mID;
  8. //英雄ID
  9. int mhero_id;
  10. //技能等级
  11. int mskill_leve;
  12. //子弹数量
  13. int mbullet_num;
  14. //子弹半径
  15. int mbullet_radius;
  16. //攻击距离
  17. int mattack_distance;
  18. //技能描述
  19. std::string mskill_des;
  20. };
  21. class M_skill
  22. {
  23. public:
  24. private:
  25. static std::auto_ptr<M_skill> msSingleton;
  26. public:
  27. int GetCount();
  28. const M_skillData* GetData(int ID);
  29. boost::unordered_map<int, M_skillData>& GetMapData();
  30. void Reload();
  31. void Load(const std::string& path);
  32. void Load();
  33. static M_skill* GetSingleton();
  34. private:
  35. boost::unordered_map<int, M_skillData> mMapData;
  36. };