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

#include <CCActionNode.h>

Inheritance diagram for ActionNode:
Object

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::Object *node)
 Sets node which will run a action. More...
 
cocos2d::ObjectgetObject ()
 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 (JsonDictionary *dic, cocos2d::Object *root)
virtual bool isActionDoneOnce ()
 Gets if the action is done once time. More...
 
- Public Member Functions inherited from Object
 Object ()
 Constructor. More...
 
virtual ~Object ()
void release ()
 Release the ownership immediately. More...
 
void retain ()
 Retains the ownership. More...
 
Objectautorelease ()
 Release the ownership sometime soon automatically. More...
 
bool isSingleReference () const
 Returns a boolean value that indicates whether there is only one reference to the object. More...
 
unsigned int retainCount () const
 Returns the object's current reference count. More...
 
virtual bool isEqual (const Object *object)
 Returns a boolean value that indicates whether this object and a given object are equal. More...
 
virtual void acceptVisitor (DataVisitor &visitor)
virtual void update (float dt)

Protected Member Functions

virtual cocos2d::NodegetActionNode ()
virtual cocos2d::SpawnrefreshActionProperty ()
virtual void runAction ()
virtual void initActionNodeFromRoot (cocos2d::Object *root)
virtual void easingToFrame (float duration, float delayTime, ActionFrame *destFrame)

Protected Attributes

int _currentFrameIndex
int _destFrameIndex
float _fUnitTime
int _actionTag
cocos2d::Spawn_actionSpawn
cocos2d::Action_action
cocos2d::Object_object
cocos2d::Array_frameArray
int _frameArrayNum
- Protected Attributes inherited from Object
unsigned int _reference
 count of references More...
 
unsigned int _autoReleaseCount
 count of autorelease More...
 

Additional Inherited Members

- Public Attributes inherited from Object
unsigned int _ID
 object id, ScriptSupport need public _ID More...
 
int _luaID
 Lua reference id. 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 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::Object* 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::Object root)
protectedvirtual
virtual void initWithDictionary ( JsonDictionary dic,
cocos2d::Object 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::Object 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
cocos2d::Array* _frameArray
protected
int _frameArrayNum
protected
float _fUnitTime
protected
cocos2d::Object* _object
protected

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