3 #ifndef __GAF_ANIMATION__
4 #define __GAF_ANIMATION__
6 #include "cocoa/CCObject.h"
9 #define GAF_FIRST_FRAME_INDEX 0
19 using namespace cocos2d;
21 enum AnimSetSequenceHint
32 virtual void onFinishSequence(
GAFAnimatedObject *
object,
const std::string& sequenceName) = 0;
39 bool init(
GAFAsset * anAnimationData);
41 virtual void processAnimation();
44 virtual void resume();
49 bool isAnimationRunning()
const;
50 bool isLooped()
const;
51 void setLooped(
bool looped);
52 int totalFrameCount()
const;
53 int currentFrameIndex()
const;
55 bool setFrame(
int index);
58 bool gotoAndStop(
const char * frameLabel);
59 bool gotoAndStop(
int frameNumber);
62 bool gotoAndPlay(
const char * frameLabel);
63 bool gotoAndPlay(
int frameNumber);
66 int getStartFrame(
const char * frameLabel);
67 int getEndFrame(
const char * frameLabel);
75 bool playSequence(
const char * name,
bool looped =
false,
bool resume =
true, AnimSetSequenceHint hint = ASSH_RESTART);
79 bool hasSequences()
const;
84 int _currentFrameIndex;
88 int _currentSequenceStart;
89 int _currentSequenceEnd;
95 #endif // __GAF_ANIMATION__
Definition: GAFAnimatedObject.h:62
Definition: GAFAsset.h:21
Definition: GAFAnimation.h:29
Definition: GAFAnimation.h:35