Fish_ArmatureCFG.h 978 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #pragma once
  2. #include <map>
  3. struct Fish_ArmatureCFGData
  4. {
  5. //模型ID
  6. int mID;
  7. //名字
  8. std::string mName;
  9. //资源类型
  10. int mResType;
  11. //资源名字
  12. std::string mResName;
  13. //资源路径
  14. std::string mResPath;
  15. //移动动作
  16. std::string mMoveAction;
  17. //死亡动作
  18. std::string mDieAction;
  19. //颜色
  20. int mColor;
  21. //缩放
  22. float mScale;
  23. //固定方向
  24. bool mEnableFlipped;
  25. //碰撞数据
  26. std::vector<float> mCollider;
  27. //附加动画
  28. std::vector<int> mAttachArmatures;
  29. //标记
  30. std::string mFixFlag;
  31. //光圈
  32. std::vector<std::string> mCircles;
  33. //附加粒子
  34. std::vector<std::string> mAttachParticles;
  35. };
  36. class Fish_ArmatureCFG
  37. {
  38. public:
  39. private:
  40. static std::auto_ptr<Fish_ArmatureCFG> msSingleton;
  41. public:
  42. int GetCount();
  43. const Fish_ArmatureCFGData* GetData(int ID);
  44. const std::map<int, Fish_ArmatureCFGData>& GetMapData();
  45. void Load();
  46. void LoadLua();
  47. void Reload();
  48. static Fish_ArmatureCFG* GetSingleton();
  49. static void Release();
  50. private:
  51. std::map<int, Fish_ArmatureCFGData> mMapData;
  52. };