3 #ifndef __GAF_ANIMATION__
4 #define __GAF_ANIMATION__
6 #define GAF_FIRST_FRAME_INDEX 0
8 #include "GAFDelegates.h"
12 enum AnimSetSequenceHint
23 bool init(
GAFAsset * anAnimationData);
25 virtual void processAnimation();
27 virtual void pauseAnimation();
28 virtual void resumeAnimation();
33 bool isAnimationRunning()
const;
34 bool isLooped()
const;
35 void setLooped(
bool looped);
36 bool isReversed()
const;
37 void setReversed(
bool reversed);
38 int totalFrameCount()
const;
39 int currentFrameIndex()
const;
41 bool setFrame(
int index);
52 int getStartFrame(
const char * frameLabel);
53 int getEndFrame(
const char * frameLabel);
61 bool playSequence(
const char * name,
bool looped =
false,
bool resume =
true, AnimSetSequenceHint hint = ASSH_RESTART);
70 bool hasSequences()
const;
75 int _currentFrameIndex;
77 void setAnimationRunning(
bool value);
78 bool getIsRunning()
const;
84 int _currentSequenceStart;
85 int _currentSequenceEnd;
92 #endif // __GAF_ANIMATION__
Definition: GAFAsset.h:18
bool playSequence(const char *name, bool looped=false, bool resume=true, AnimSetSequenceHint hint=ASSH_RESTART)
Definition: GAFAnimation.cpp:308
Definition: GAFDelegates.h:13
void setSequenceDelegate(GAFSequenceDelegate *delegate)
Definition: GAFAnimation.cpp:26
bool isDone() const
Definition: GAFAnimation.cpp:150
bool gotoAndPlay(const char *frameLabel)
Plays animation from specified frame.
Definition: GAFAnimation.cpp:248
Definition: GAFDelegates.h:7
void setAnimationPlaybackDelegate(GAFAnimationPlaybackDelegate *delegate)
Definition: GAFAnimation.cpp:376
bool gotoAndStop(const char *frameLabel)
Plays specified frame and then stops.
Definition: GAFAnimation.cpp:228
Definition: GAFAnimation.h:19