#pragma once #include #include struct Fish_ArmatureCFGData { //模型ID int mID; //名字 std::string mName; //资源类型 int mResType; //资源名字 std::string mResName; //资源路径 std::string mResPath; //移动动作 std::string mMoveAction; //死亡动作 std::string mDieAction; //颜色 int mColor; //缩放 float mScale; //固定方向 bool mEnableFlipped; //碰撞数据 std::vector mCollider; //附加动画 std::vector mAttachArmatures; //标记 std::string mFixFlag; //光圈 std::vector mCircles; //附加粒子 std::vector mAttachParticles; }; class Fish_ArmatureCFG { public: private: static std::auto_ptr msSingleton; public: int GetCount(); const Fish_ArmatureCFGData* GetData(int ID); boost::unordered_map& GetMapData(); void Reload(); void Load(const std::string& path); void Load(); static Fish_ArmatureCFG* GetSingleton(); private: boost::unordered_map mMapData; };