3 #ifndef __GAF_ANIMATED_OBJECT_H__
4 #define __GAF_ANIMATED_OBJECT_H__
6 #include "layers_scenes_transitions_nodes/CCLayer.h"
7 #include "GAFAnimation.h"
24 using namespace cocos2d;
26 enum PCAnimationFPSType
28 kGAFAnimationFPSType_15 = 15,
29 kGAFAnimationFPSType_30 = 30,
30 kGAFAnimationFPSType_60 = 60
33 enum GAFAnimatedObjectControlFlags
35 kGAFAnimatedObjectControl_None = 0,
38 kGAFAnimatedObjectControl_ApplyState = 1 << 0
68 static GAFAnimatedObject * createAndRun(
const char * jsonPath,
bool looped =
false);
71 void processAnimations(
float dt);
72 CCPoint pupilCoordinatesWithXSemiaxis(
float anXSemiaxis,
float anYSemiaxis, CCPoint aCenter, CCPoint anExternalPoint);
73 GAFSprite * subObjectForInnerObjectId(CCString * anInnerObjectId);
74 void removeAllSubObjects();
75 void addSubObjectsUsingAnimationObjectsDictionary(CCDictionary * anAnimationObjects, CCDictionary * anAnimationMasks, CCArray * anAnimationFrames);
76 void setSubobjectsVisible(
bool visible);
77 CCDictionary * subObjects();
78 CCDictionary * masks();
79 void animatorDidPlayedFrame(GAFAnimator * anAnimator,
int aFrameNo);
81 GAFSprite * subobjectByName(
const char * name);
83 GAFSprite * subobjectByRawName(
const char * name);
86 virtual void processAnimation();
93 bool captureControlOverSubobjectNamed(
const char * aName, GAFAnimatedObjectControlFlags aControlFlags);
95 void releaseControlOverSubobjectNamed(
const char * aName);
99 CCRect realBoundingBoxForCurrentFrame();
102 GAFSprite * subObjectForInnerObjectId(
const char * anInnerObjectId);
103 std::string objectIdByObjectName(
const char * aName);
107 CCDictionary * _subObjects;
108 CCDictionary * _masks;
109 CCDictionary * _capturedObjects;
110 bool _animationsSelectorScheduled;
114 int numberOfGlobalFramesForOneAnimationFrame();
115 int _extraFramesCounter;
116 PCAnimationFPSType _FPSType;
120 #endif // __GAF_ANIMATED_OBJECT_H__
Definition: GAFAnimatedObject.h:62
Definition: GAFSprite.h:29
Definition: GAFAsset.h:21
Definition: GAFAnimatedObject.h:56
Definition: GAFAnimatedObject.h:46
Definition: GAFAnimation.h:35