标签:
1 class CCSkeletonAnimation: public CCSkeleton { 2 public: 3 std::vector<AnimationState*> states; 4 5 static CCSkeletonAnimation* createWithData (SkeletonData* skeletonData); 6 static CCSkeletonAnimation* createWithFile (const char* skeletonDataFile, Atlas* atlas, float scale = 1); 7 static CCSkeletonAnimation* createWithFile (const char* skeletonDataFile, const char* atlasFile, float scale = 1); 8 9 CCSkeletonAnimation (SkeletonData* skeletonData); 10 CCSkeletonAnimation (const char* skeletonDataFile, Atlas* atlas, float scale = 1); 11 CCSkeletonAnimation (const char* skeletonDataFile, const char* atlasFile, float scale = 1); 12 13 virtual ~CCSkeletonAnimation (); 14 15 virtual void update (float deltaTime); 16 17 void addAnimationState (AnimationStateData* stateData = 0); 18 void setAnimationStateData (AnimationStateData* stateData, int stateIndex = 0); 19 void setMix (const char* fromAnimation, const char* toAnimation, float duration, int stateIndex = 0); 20 void setAnimation (const char* name, bool loop, int stateIndex = 0); 21 void addAnimation (const char* name, bool loop, float delay = 0, int stateIndex = 0); 22 void clearAnimation (int stateIndex = 0); 23 24 protected: 25 CCSkeletonAnimation (); 26 27 private: 28 typedef CCSkeleton super; 29 std::vector<AnimationStateData*> stateDatas; 30 31 void initialize (); 32 };
1 class CCSkeletonAnimation: public CCSkeleton { 2 public: 3 std::vector<AnimationState*> states; 4 5 static CCSkeletonAnimation* createWithData (SkeletonData* skeletonData); 6 static CCSkeletonAnimation* createWithFile (const char* skeletonDataFile, Atlas* atlas, float scale = 1); 7 static CCSkeletonAnimation* createWithFile (const char* skeletonDataFile, const char* atlasFile, float scale = 1); 8 9 CCSkeletonAnimation (SkeletonData* skeletonData); 10 CCSkeletonAnimation (const char* skeletonDataFile, Atlas* atlas, float scale = 1); 11 CCSkeletonAnimation (const char* skeletonDataFile, const char* atlasFile, float scale = 1); 12 13 virtual ~CCSkeletonAnimation (); 14 15 virtual void update (float deltaTime); 16 17 void addAnimationState (AnimationStateData* stateData = 0); 18 void setAnimationStateData (AnimationStateData* stateData, int stateIndex = 0); 19 void setMix (const char* fromAnimation, const char* toAnimation, float duration, int stateIndex = 0); 20 void setAnimation (const char* name, bool loop, int stateIndex = 0); 21 void addAnimation (const char* name, bool loop, float delay = 0, int stateIndex = 0); 22 void clearAnimation (int stateIndex = 0); 23 24 protected: 25 CCSkeletonAnimation (); 26 27 private: 28 typedef CCSkeleton super; 29 std::vector<AnimationStateData*> stateDatas; 30 31 void initialize (); 32 };
标签:
原文地址:http://www.cnblogs.com/elloop/p/4977352.html