GAF Library
Generic Animation Format
 All Classes Functions Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
GAFAnimatedObject Class Reference
Inheritance diagram for GAFAnimatedObject:
GAFAnimation

Public Member Functions

bool init (GAFAsset *anAsset)
 
void processAnimations (float dt)
 
CCPoint pupilCoordinatesWithXSemiaxis (float anXSemiaxis, float anYSemiaxis, CCPoint aCenter, CCPoint anExternalPoint)
 
GAFSpritesubObjectForInnerObjectId (CCString *anInnerObjectId)
 
void removeAllSubObjects ()
 
void addSubObjectsUsingAnimationObjectsDictionary (CCDictionary *anAnimationObjects, CCDictionary *anAnimationMasks, CCArray *anAnimationFrames)
 
void setSubobjectsVisible (bool visible)
 
CCDictionary * subObjects ()
 
CCDictionary * masks ()
 
void animatorDidPlayedFrame (GAFAnimator *anAnimator, int aFrameNo)
 
GAFSpritesubobjectByName (const char *name)
 Returns subobject which has specified name assigned to it ("namedParts" section in config)
 
GAFSpritesubobjectByRawName (const char *name)
 
virtual void start ()
 
virtual void stop ()
 
virtual void processAnimation ()
 
bool captureControlOverSubobjectNamed (const char *aName, GAFAnimatedObjectControlFlags aControlFlags)
 
void releaseControlOverSubobjectNamed (const char *aName)
 Releases control over subobject captured earlier.
 
void setFramePlayedDelegate (GAFFramePlayedDelegate *delegate)
 
void setControlDelegate (GAFAnimatedObjectControlDelegate *delegate)
 
CCRect realBoundingBoxForCurrentFrame ()
 
- Public Member Functions inherited from GAFAnimation
bool init (GAFAsset *anAnimationData)
 
virtual void pause ()
 
virtual void resume ()
 
virtual void step ()
 
bool isDone () const
 
bool isAnimationRunning () const
 
bool isLooped () const
 
void setLooped (bool looped)
 
int totalFrameCount () const
 
int currentFrameIndex () const
 
bool setFrame (int index)
 
bool gotoAndStop (const char *frameLabel)
 Plays specified frame and then stops.
 
bool gotoAndStop (int frameNumber)
 
bool gotoAndPlay (const char *frameLabel)
 Plays animation from specified frame.
 
bool gotoAndPlay (int frameNumber)
 
int getStartFrame (const char *frameLabel)
 
int getEndFrame (const char *frameLabel)
 
bool playSequence (const char *name, bool looped=false, bool resume=true, AnimSetSequenceHint hint=ASSH_RESTART)
 
void clearSequence ()
 
void setSequenceDelegate (GAFSequenceDelegate *delegate)
 
bool hasSequences () const
 

Static Public Member Functions

static GAFAnimatedObjectcreate (GAFAsset *anAsset)
 
static GAFAnimatedObjectcreate (const char *jsonPath)
 
static GAFAnimatedObjectcreateAndRun (const char *jsonPath, bool looped=false)
 

Protected Member Functions

GAFSpritesubObjectForInnerObjectId (const char *anInnerObjectId)
 
std::string objectIdByObjectName (const char *aName)
 

Additional Inherited Members

- Protected Attributes inherited from GAFAnimation
GAFAsset_asset
 
int _currentFrameIndex
 

Member Function Documentation

bool GAFAnimatedObject::captureControlOverSubobjectNamed ( const char *  aName,
GAFAnimatedObjectControlFlags  aControlFlags 
)

Takes control over subobject, which means that every frame control delegate will be notified to decide what to do with captured external object

Note
it supports only objects for now, DOES NOT SUPPORT MASKS
Parameters
subobjectname taken from "namedParts" section in config
controlFlagsflags specifying what played will do with subobjects controlled externally
Returns
YES if control was successfully taken and all future

The documentation for this class was generated from the following files: