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

#include <CCActionNode.h>

Inheritance diagram for ActionNode:
Ref

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 (cocos2d::Ref *node)
 Sets node which will run a action. More...
 
cocos2d::RefgetObject ()
 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, cocos2d::Ref *root)
virtual bool isActionDoneOnce ()
 Gets if the action is done once time. More...
 
- Public Member Functions inherited from Ref
void retain ()
 Retains the ownership. More...
 
void release ()
 Release the ownership immediately. More...
 
local release ()
 Release the ownership immediately. More...
 
Refautorelease ()
 Release the ownership sometime soon automatically. More...
 
unsigned int getReferenceCount () const
 Returns the Ref's current reference count. More...
 
virtual ~Ref ()

Protected Member Functions

virtual cocos2d::NodegetActionNode ()
virtual cocos2d::SpawnrefreshActionProperty ()
virtual void runAction ()
virtual void initActionNodeFromRoot (cocos2d::Ref *root)
virtual void easingToFrame (float duration, float delayTime, ActionFrame *srcFrame, ActionFrame *destFrame)
- Protected Member Functions inherited from Ref
 Ref ()
 Constructor. More...
 
 Ref ()
 Constructor. More...
 

Protected Attributes

int _currentFrameIndex
int _destFrameIndex
float _fUnitTime
int _actionTag
cocos2d::Spawn_actionSpawn
cocos2d::Action_action
cocos2d::Ref_object
std::vector< cocos2d::Vector
< ActionFrame * > * > 
_frameArray
int _frameArrayNum
- Protected Attributes inherited from Ref
unsigned int _referenceCount
 count of references More...
 

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 cocos2d::Node*
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
cocos2d::Ref* 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 ( cocos2d::Ref root)
protectedvirtual
virtual void initWithDictionary ( const rapidjson::Value &  dic,
cocos2d::Ref 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 cocos2d::Spawn*
refreshActionProperty
( )
protectedvirtual
virtual void runAction ( )
protectedvirtual
void setActionTag ( int  tag)

Sets tag for ActionNode.

Parameters
tagtag of ActionNode
void setObject ( cocos2d::Ref 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

Member Data Documentation

cocos2d::Action* _action
protected
cocos2d::Spawn* _actionSpawn
protected
int _actionTag
protected
int _currentFrameIndex
protected
int _destFrameIndex
protected
std::vector<cocos2d::Vector
<ActionFrame*>*> _frameArray
protected
int _frameArrayNum
protected
float _fUnitTime
protected
cocos2d::Ref* _object
protected

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