M_skill.h 765 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. float mattack_Interval;
  20. //��������
  21. std::string mskill_des;
  22. };
  23. class M_skill
  24. {
  25. public:
  26. private:
  27. static std::auto_ptr<M_skill> msSingleton;
  28. public:
  29. int GetCount();
  30. const M_skillData* GetData(int ID);
  31. boost::unordered_map<int, M_skillData>& GetMapData();
  32. void Reload();
  33. void Load(const std::string& path);
  34. void Load();
  35. static M_skill* GetSingleton();
  36. private:
  37. boost::unordered_map<int, M_skillData> mMapData;
  38. };