cocos2d-x  2.2.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ActionNode Class Reference

#include <CCActionNode.h>

Inheritance diagram for ActionNode:
CCObject CCCopying

Public Member Functions

 ActionNode ()
virtual ~ActionNode ()
 Default destructor. More...
 
void setUnitTime (float fTime)
 Sets the time interval of frame. More...
 
float getUnitTime ()
 Gets the time interval of frame. More...
 
void setActionTag (int tag)
 Sets tag for ActionNode. More...
 
int getActionTag ()
 Gets tag for ActionNode. More...
 
void setObject (CCObject *node)
 Sets node which will run a action. More...
 
CCObjectgetObject ()
 Gets node which will run a action. More...
 
void insertFrame (int index, ActionFrame *frame)
 Insets a ActionFrame to ActionNode. More...
 
void addFrame (ActionFrame *frame)
 Pushs back a ActionFrame to ActionNode. More...
 
void deleteFrame (ActionFrame *frame)
 Remove a ActionFrame from ActionNode. More...
 
void clearAllFrame ()
 Remove all ActionFrames from ActionNode. More...
 
int getFirstFrameIndex ()
 Gets index of first ActionFrame. More...
 
int getLastFrameIndex ()
 Gets index of last ActionFrame. More...
 
virtual bool updateActionToTimeLine (float fTime)
 Updates action states to some time. More...
 
virtual void playAction ()
 Play the action. More...
 
virtual void stopAction ()
 Stop the action. More...
 
virtual void initWithDictionary (const rapidjson::Value &dic, CCObject *root)
virtual void initWithBinary (CocoLoader *pCocoLoader, stExpCocoNode *pCocoNode, CCObject *root)
virtual bool isActionDoneOnce ()
 Gets if the action is done once time. More...
 
- Public Member Functions inherited from CCObject
 CCObject (void)
virtual ~CCObject (void)
void release (void)
void retain (void)
CCObjectautorelease (void)
CCObjectcopy (void)
bool isSingleReference (void) const
unsigned int retainCount (void) const
virtual bool isEqual (const CCObject *pObject)
virtual void acceptVisitor (CCDataVisitor &visitor)
virtual void update (float dt)
- Public Member Functions inherited from CCCopying
virtual CCObjectcopyWithZone (CCZone *pZone)

Protected Member Functions

int valueToInt (std::string &value)
bool valueToBool (std::string &value)
float valueToFloat (std::string &value)
virtual CCNodegetActionNode ()
virtual CCSpawnrefreshActionProperty ()
virtual void runAction ()
virtual void initActionNodeFromRoot (CCObject *root)
virtual void easingToFrame (float duration, float delayTime, ActionFrame *srcFrame, ActionFrame *destFrame)

Protected Attributes

int currentFrameIndex
int destFrameIndex
float m_fUnitTime
int m_ActionTag
CCObjectm_Object
CCSpawnm_actionSpawn
CCActionm_action
CCArraym_FrameArray
int frameArrayNum
- Protected Attributes inherited from CCObject
unsigned int m_uReference
unsigned int m_uAutoReleaseCount

Additional Inherited Members

- Public Attributes inherited from CCObject
unsigned int m_uID
int m_nLuaID

Constructor & Destructor Documentation

virtual ~ActionNode ( )
virtual

Default destructor.

Member Function Documentation

void addFrame ( ActionFrame frame)

Pushs back a ActionFrame to ActionNode.

Parameters
framethe ActionFrame which will be added
void clearAllFrame ( )

Remove all ActionFrames from ActionNode.

void deleteFrame ( ActionFrame frame)

Remove a ActionFrame from ActionNode.

Parameters
framethe ActionFrame which will be removed
virtual void easingToFrame ( float  duration,
float  delayTime,
ActionFrame srcFrame,
ActionFrame destFrame 
)
protectedvirtual
virtual CCNode* getActionNode ( )
protectedvirtual
int getActionTag ( )

Gets tag for ActionNode.

Returns
tag tag of ActionNode
int getFirstFrameIndex ( )

Gets index of first ActionFrame.

Returns
index of first ActionFrame
int getLastFrameIndex ( )

Gets index of last ActionFrame.

Returns
index of last ActionFrame
CCObject* getObject ( )

Gets node which will run a action.

Returns
node which will run a action
float getUnitTime ( )

Gets the time interval of frame.

Returns
fTime the time interval of frame
virtual void initActionNodeFromRoot ( CCObject root)
protectedvirtual
virtual void initWithBinary ( CocoLoader pCocoLoader,
stExpCocoNode pCocoNode,
CCObject root 
)
virtual
virtual void initWithDictionary ( const rapidjson::Value dic,
CCObject root 
)
virtual
void insertFrame ( int  index,
ActionFrame frame 
)

Insets a ActionFrame to ActionNode.

Parameters
indexthe index of ActionFrame
framethe ActionFrame which will be inserted
virtual bool isActionDoneOnce ( )
virtual

Gets if the action is done once time.

Returns
that if the action is done once time
virtual void playAction ( )
virtual

Play the action.

virtual CCSpawn*
refreshActionProperty
( )
protectedvirtual
virtual void runAction ( )
protectedvirtual
void setActionTag ( int  tag)

Sets tag for ActionNode.

Parameters
tagtag of ActionNode
void setObject ( CCObject node)

Sets node which will run a action.

Parameters
nodewhich will run a action
void setUnitTime ( float  fTime)

Sets the time interval of frame.

Parameters
fTimethe time interval of frame
virtual void stopAction ( )
virtual

Stop the action.

virtual bool updateActionToTimeLine ( float  fTime)
virtual

Updates action states to some time.

Parameters
fTimethe time when need to update
bool valueToBool ( std::string &  value)
protected
float valueToFloat ( std::string &  value)
protected
int valueToInt ( std::string &  value)
protected

Member Data Documentation

int currentFrameIndex
protected
int destFrameIndex
protected
int frameArrayNum
protected
CCAction* m_action
protected
CCSpawn* m_actionSpawn
protected
int m_ActionTag
protected
CCArray* m_FrameArray
protected
float m_fUnitTime
protected
CCObject* m_Object
protected

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