cocos2d-x  2.2.6
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
ActionTimeline Class Reference

#include <CCActionTimeline.h>

Inheritance diagram for ActionTimeline:

Public Member Functions

virtual  ~ActionTimeline ()
virtual bool  init ()
virtual void  gotoFrameAndPlay (int startIndex)
  Goto the specified frame index, and start playing from this index. More...
 
var  gotoFrameAndPlay ( var startIndex)
  Goto the specified frame index, and start playing from this index. More...
 
local  gotoFrameAndPlay ( local startIndex)
  Goto the specified frame index, and start playing from this index. More...
 
virtual void  gotoFrameAndPlay (int startIndex, bool loop)
  Goto the specified frame index, and start playing from this index. More...
 
var  gotoFrameAndPlay ( var startIndex, var loop)
  Goto the specified frame index, and start playing from this index. More...
 
local  gotoFrameAndPlay ( local startIndex, local loop)
  Goto the specified frame index, and start playing from this index. More...
 
virtual void  gotoFrameAndPlay (int startIndex, int endIndex, bool loop)
  Goto the specified frame index, and start playing from start index, end at end index. More...
 
virtual void  gotoFrameAndPlay (int startIndex, int endIndex, int currentFrameIndex, bool loop)
  Goto the specified frame index, and start playing from start index, end at end index. More...
 
virtual void  gotoFrameAndPause (int startIndex)
  Goto the specified frame index, and pause at this index. More...
 
var  gotoFrameAndPause ( var startIndex)
  Goto the specified frame index, and pause at this index. More...
 
local  gotoFrameAndPause ( local startIndex)
  Goto the specified frame index, and pause at this index. More...
 
virtual void  pause ()
  Pause the animation. More...
 
virtual void  resume ()
  Resume the animation. More...
 
virtual bool  isPlaying () const
  Whether or not Action is playing. More...
 
virtual void  setTimeSpeed (float speed)
  Set the animation speed, this will speed up or slow down the speed. More...
 
virtual float  getTimeSpeed () const
  Get current animation speed. More...
 
virtual void  setDuration (int duration)
  duration of the whole action More...
 
local  setDuration ( local duration)
  duration of the whole action More...
 
virtual int  getDuration () const
var  getDuration ()
local  getDuration ()
virtual int  getStartFrame () const
  Start frame index of this action. More...
 
local  getStartFrame ()
  Start frame index of this action. More...
 
virtual int  getEndFrame () const
  End frame of this action. More...
 
virtual void  setCurrentFrame (int frameIndex)
  Set current frame index, this will cause action plays to this frame. More...
 
var  setCurrentFrame ( var frameIndex)
  Set current frame index, this will cause action plays to this frame. More...
 
local  setCurrentFrame ( local frameIndex)
  Set current frame index, this will cause action plays to this frame. More...
 
virtual int  getCurrentFrame () const
  Get current frame. More...
 
virtual void  addTimeline (Timeline *timeline)
 
local  addTimeline ( local timeline)
 
virtual void  removeTimeline (Timeline *timeline)
var  removeTimeline ( var timeline)
local  removeTimeline ( local timeline)
  Set action's frame event callback function. More...
 
local  setFrameEventCallFunc ( local target, local callFunc)
  Set action's frame event callback function. More...
 
virtual ActionTimelineclone () const
  Inherit from cocos2d::Action. More...
 
local  clone ()
  Inherit from cocos2d::Action. More...
 
virtual ActionTimelinereverse () const
  Returns a reverse of ActionTimeline. More...
 
local  reverse ()
  Returns a reverse of ActionTimeline. More...
 
virtual void  step (float delta)
  called every frame with it's delta time. DON'T override unless you know what you are doing. More...
 
local  step ( local delta)
  called every frame with it's delta time. DON'T override unless you know what you are doing. More...
 
virtual void  startWithTarget (cocos2d::CCNode *target)
  called before the action start. It will also set the target. More...
 
var  startWithTarget ( var target)
  called before the action start. It will also set the target. More...
 
local  startWithTarget ( local target)
  called before the action start. It will also set the target. More...
 
virtual bool  isDone ()
  return true if the action has finished More...
 
  Returns a user assigned CCDictionary. More...
 
  Returns a user assigned CCDictionary. More...
 
virtual void  setScriptObjectDict (cocos2d::CCDictionary *scriptObjectDict)
  Returns a user assigned CCDictionary. More...
 
local  setScriptObjectDict ( local scriptObjectDict)
  Returns a user assigned CCDictionary. More...
 
- Public Member Functions inherited from CCAction
  CCAction (void)
  ctor ()
  CCAction ()
virtual  ~CCAction (void)
const char *  description ()
virtual CCObjectcopyWithZone (CCZone *pZone)
virtual void  stop (void)
  called after the action has finished. More...
 
virtual void  update (float time)
  called once per frame. More...
 
local  update ( local time)
  called once per frame. More...
 
CCNodegetTarget (void)
var  getTarget ()
local  getTarget ()
void  setTarget (CCNode *pTarget)
  The action will modify the target properties. More...
 
local  setTarget ( local pTarget)
  The action will modify the target properties. More...
 
local  getOriginalTarget ()
void  setOriginalTarget (CCNode *pOriginalTarget)
  Set the original target, since target can be nil. More...
 
int  getTag (void)
var  getTag ()
local  getTag ()
void  setTag (int nTag)
var  setTag ( var nTag)
local  setTag ( local nTag)
- 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)

Static Public Member Functions

static ActionTimelinecreate ()
- Static Public Member Functions inherited from CCAction
static CCActioncreate ()
  Create an action. More...
 
var  create ()
  Create an action. More...
 
local  create ()
  Create an action. More...
 

Protected Member Functions

virtual void  gotoFrame (int frameIndex)
virtual void  stepToFrame (int frameIndex)
var  stepToFrame ( var frameIndex)
local  stepToFrame ( local frameIndex)
void  emitFrameEvent (Frame *frame)
  emit frame event, call it when enter a frame More...
 

Protected Attributes

std::map< int, cocos2d::CCArray * >  _timelineMap
local  _timelineMap
int  _duration
double  _time
float  _timeSpeed
float  _frameInternal
bool  _playing
int  _startFrame
int  _endFrame
bool  _loop
- Protected Attributes inherited from CCAction
  The "target". More...
 
local  m_pTarget
  The "target". More...
 
int  m_nTag
  The action tag. More...
 
- Protected Attributes inherited from CCObject
unsigned int  m_uReference
unsigned int  m_uAutoReleaseCount

Friends

class  Frame

Additional Inherited Members

- Public Attributes inherited from CCObject
unsigned int  m_uID
int  m_nLuaID

Constructor & Destructor Documentation

var ActionTimeline ( )
local ActionTimeline ( )
virtual ~ActionTimeline ( )
virtual
var ~ActionTimeline ( )
virtual
local ~ActionTimeline ( )
virtual

Member Function Documentation

virtual void addTimeline ( Timelinetimeline )
virtual

add Timeline to ActionTimeline

var addTimeline ( var  timeline )
virtual

add Timeline to ActionTimeline

local addTimeline ( local  timeline )
virtual

add Timeline to ActionTimeline

void clearFrameEventCallFunc ( )
var clearFrameEventCallFunc ( )
local clearFrameEventCallFunc ( )
virtual ActionTimeline* clone ( ) const
virtual

Inherit from cocos2d::Action.

Returns a clone of ActionTimeline

var clone ( )
virtual

Inherit from cocos2d::Action.

Returns a clone of ActionTimeline

local clone ( )
virtual

Inherit from cocos2d::Action.

Returns a clone of ActionTimeline

static ActionTimeline* create ( )
static
var create ( )
static
local create ( )
static
void emitFrameEvent ( Frameframe )
protected

emit frame event, call it when enter a frame

var emitFrameEvent ( var  frame )
protected

emit frame event, call it when enter a frame

local emitFrameEvent ( local  frame )
protected

emit frame event, call it when enter a frame

void foreachNodeDescendant ( cocos2d::CCNodeparent )
protected
var foreachNodeDescendant ( var  parent )
protected
local foreachNodeDescendant ( local  parent )
protected
virtual int getCurrentFrame ( ) const
inlinevirtual

Get current frame.

var getCurrentFrame ( )
inlinevirtual

Get current frame.

local getCurrentFrame ( )
inlinevirtual

Get current frame.

virtual int getDuration ( ) const
inlinevirtual
var getDuration ( )
inlinevirtual
local getDuration ( )
inlinevirtual
virtual int getEndFrame ( ) const
inlinevirtual

End frame of this action.

When action play to this frame, if action is not loop, then it will stop, or it will play from start frame again.

var getEndFrame ( )
inlinevirtual

End frame of this action.

When action play to this frame, if action is not loop, then it will stop, or it will play from start frame again.

local getEndFrame ( )
inlinevirtual

End frame of this action.

When action play to this frame, if action is not loop, then it will stop, or it will play from start frame again.

virtual cocos2d::CCDictionary*
getScriptObjectDict ( ) const
virtual

Returns a user assigned CCDictionary.

Returns
A user assigned CCDictionary
var getScriptObjectDict ( )
virtual

Returns a user assigned CCDictionary.

Returns
A user assigned CCDictionary
local getScriptObjectDict ( )
virtual

Returns a user assigned CCDictionary.

Returns
A user assigned CCDictionary
virtual int getStartFrame ( ) const
inlinevirtual

Start frame index of this action.

var getStartFrame ( )
inlinevirtual

Start frame index of this action.

local getStartFrame ( )
inlinevirtual

Start frame index of this action.

virtual float getTimeSpeed ( ) const
inlinevirtual

Get current animation speed.

var getTimeSpeed ( )
inlinevirtual

Get current animation speed.

local getTimeSpeed ( )
inlinevirtual

Get current animation speed.

virtual void gotoFrame ( int  frameIndex )
protectedvirtual
var gotoFrame ( var  frameIndex )
protectedvirtual
local gotoFrame ( local  frameIndex )
protectedvirtual
virtual void gotoFrameAndPause ( int  startIndex )
virtual

Goto the specified frame index, and pause at this index.

Parameters
startIndex The animation will pause at this index.
var gotoFrameAndPause ( var  startIndex )
virtual

Goto the specified frame index, and pause at this index.

Parameters
startIndex The animation will pause at this index.
local gotoFrameAndPause ( local  startIndex )
virtual

Goto the specified frame index, and pause at this index.

Parameters
startIndex The animation will pause at this index.
virtual void gotoFrameAndPlay ( int  startIndex )
virtual

Goto the specified frame index, and start playing from this index.

Parameters
startIndex The animation will play from this index.
var gotoFrameAndPlay ( var  startIndex )
virtual

Goto the specified frame index, and start playing from this index.

Parameters
startIndex The animation will play from this index.
local gotoFrameAndPlay ( local  startIndex )
virtual

Goto the specified frame index, and start playing from this index.

Parameters
startIndex The animation will play from this index.
virtual void gotoFrameAndPlay ( int  startIndex,
bool  loop 
)
virtual

Goto the specified frame index, and start playing from this index.

Parameters
startIndex The animation will play from this index.
loop Whether or not the animation need loop.
var gotoFrameAndPlay ( var  startIndex,
var  loop 
)
virtual

Goto the specified frame index, and start playing from this index.

Parameters
startIndex The animation will play from this index.
loop Whether or not the animation need loop.
local gotoFrameAndPlay ( local  startIndex,
local  loop 
)
virtual

Goto the specified frame index, and start playing from this index.

Parameters
startIndex The animation will play from this index.
loop Whether or not the animation need loop.
virtual void gotoFrameAndPlay ( int  startIndex,
int  endIndex,
bool  loop 
)
virtual

Goto the specified frame index, and start playing from start index, end at end index.

Parameters
startIndex The animation will play from this index.
endIndex The animation will end at this index.
loop Whether or not the animation need loop.
var gotoFrameAndPlay ( var  startIndex,
var  endIndex,
var  loop 
)
virtual

Goto the specified frame index, and start playing from start index, end at end index.

Parameters
startIndex The animation will play from this index.
endIndex The animation will end at this index.
loop Whether or not the animation need loop.
local gotoFrameAndPlay ( local  startIndex,
local  endIndex,
local  loop 
)
virtual

Goto the specified frame index, and start playing from start index, end at end index.

Parameters
startIndex The animation will play from this index.
endIndex The animation will end at this index.
loop Whether or not the animation need loop.
virtual void gotoFrameAndPlay ( int  startIndex,
int  endIndex,
int  currentFrameIndex,
bool  loop 
)
virtual

Goto the specified frame index, and start playing from start index, end at end index.

Parameters
startIndex The animation will play from this index.
endIndex The animation will end at this index.
currentFrameIndex set current frame index.
loop Whether or not the animation need loop.
var gotoFrameAndPlay ( var  startIndex,
var  endIndex,
var  currentFrameIndex,
var  loop 
)
virtual

Goto the specified frame index, and start playing from start index, end at end index.

Parameters
startIndex The animation will play from this index.
endIndex The animation will end at this index.
currentFrameIndex set current frame index.
loop Whether or not the animation need loop.
local gotoFrameAndPlay ( local  startIndex,
local  endIndex,
local  currentFrameIndex,
local  loop 
)
virtual

Goto the specified frame index, and start playing from start index, end at end index.

Parameters
startIndex The animation will play from this index.
endIndex The animation will end at this index.
currentFrameIndex set current frame index.
loop Whether or not the animation need loop.
virtual bool init ( )
virtual
var init ( )
virtual
local init ( )
virtual
virtual bool isDone ( )
inlinevirtual

return true if the action has finished

Reimplemented from CCAction.

var isDone ( )
inlinevirtual

return true if the action has finished

Reimplemented from CCAction.

local isDone ( )
inlinevirtual

return true if the action has finished

Reimplemented from CCAction.

virtual bool isPlaying ( ) const
virtual

Whether or not Action is playing.

var isPlaying ( )
virtual

Whether or not Action is playing.

local isPlaying ( )
virtual

Whether or not Action is playing.

virtual void pause ( )
virtual

Pause the animation.

var pause ( )
virtual

Pause the animation.

local pause ( )
virtual

Pause the animation.

virtual void removeTimeline ( Timelinetimeline )
virtual
var removeTimeline ( var  timeline )
virtual
local removeTimeline ( local  timeline )
virtual
virtual void resume ( )
virtual

Resume the animation.

var resume ( )
virtual

Resume the animation.

local resume ( )
virtual

Resume the animation.

virtual ActionTimeline* reverse ( ) const
inlinevirtual

Returns a reverse of ActionTimeline.

Not implement yet.

var reverse ( )
inlinevirtual

Returns a reverse of ActionTimeline.

Not implement yet.

local reverse ( )
inlinevirtual

Returns a reverse of ActionTimeline.

Not implement yet.

virtual void setCurrentFrame ( int  frameIndex )
virtual

Set current frame index, this will cause action plays to this frame.

var setCurrentFrame ( var  frameIndex )
virtual

Set current frame index, this will cause action plays to this frame.

local setCurrentFrame ( local  frameIndex )
virtual

Set current frame index, this will cause action plays to this frame.

virtual void setDuration ( int  duration )
inlinevirtual

duration of the whole action

var setDuration ( var  duration )
inlinevirtual

duration of the whole action

local setDuration ( local  duration )
inlinevirtual

duration of the whole action

void setFrameEventCallFunc ( CCObjecttarget,
)

Set action's frame event callback function.

var setFrameEventCallFunc ( var  target,
var  callFunc 
)

Set action's frame event callback function.

local setFrameEventCallFunc ( local  target,
local  callFunc 
)

Set action's frame event callback function.

virtual void setScriptObjectDict ( cocos2d::CCDictionaryscriptObjectDict )
virtual

Returns a user assigned CCDictionary.

The scriptObjectDict will be retained once in this method, and the previous scriptObjectDict (if existed) will be relese. The scriptObjectDict will be released in destructure.

Parameters
A user assigned CCObject
var setScriptObjectDict ( var  scriptObjectDict )
virtual

Returns a user assigned CCDictionary.

The scriptObjectDict will be retained once in this method, and the previous scriptObjectDict (if existed) will be relese. The scriptObjectDict will be released in destructure.

Parameters
A user assigned CCObject
local setScriptObjectDict ( local  scriptObjectDict )
virtual

Returns a user assigned CCDictionary.

The scriptObjectDict will be retained once in this method, and the previous scriptObjectDict (if existed) will be relese. The scriptObjectDict will be released in destructure.

Parameters
A user assigned CCObject
virtual void setTimeSpeed ( float  speed )
inlinevirtual

Set the animation speed, this will speed up or slow down the speed.

var setTimeSpeed ( var  speed )
inlinevirtual

Set the animation speed, this will speed up or slow down the speed.

local setTimeSpeed ( local  speed )
inlinevirtual

Set the animation speed, this will speed up or slow down the speed.

virtual void startWithTarget ( cocos2d::CCNodepTarget )
virtual

called before the action start. It will also set the target.

Reimplemented from CCAction.

var startWithTarget ( var  pTarget )
virtual

called before the action start. It will also set the target.

Reimplemented from CCAction.

local startWithTarget ( local  pTarget )
virtual

called before the action start. It will also set the target.

Reimplemented from CCAction.

virtual void step ( float  dt )
virtual

called every frame with it's delta time. DON'T override unless you know what you are doing.

Reimplemented from CCAction.

var step ( var  dt )
virtual

called every frame with it's delta time. DON'T override unless you know what you are doing.

Reimplemented from CCAction.

local step ( local  dt )
virtual

called every frame with it's delta time. DON'T override unless you know what you are doing.

Reimplemented from CCAction.

virtual void stepToFrame ( int  frameIndex )
protectedvirtual
var stepToFrame ( var  frameIndex )
protectedvirtual
local stepToFrame ( local  frameIndex )
protectedvirtual

Friends And Related Function Documentation

friend class Frame
friend

Member Data Documentation

int _currentFrame
protected
var _currentFrame
protected
local _currentFrame
protected
int _duration
protected
var _duration
protected
local _duration
protected
int _endFrame
protected
var _endFrame
protected
local _endFrame
protected
SEL_TimelineFrameEventCallFunc
_frameEventCallFunc
protected
var _frameEventCallFunc
protected
local _frameEventCallFunc
protected
cocos2d::CCObject*
_frameEventTarget
protected
var _frameEventTarget
protected
local _frameEventTarget
protected
float _frameInternal
protected
var _frameInternal
protected
local _frameInternal
protected
bool _loop
protected
var _loop
protected
local _loop
protected
bool _playing
protected
var _playing
protected
local _playing
protected
cocos2d::CCDictionary*
_scriptObjectDict
protected
var _scriptObjectDict
protected
local _scriptObjectDict
protected
int _startFrame
protected
var _startFrame
protected
local _startFrame
protected
double _time
protected
var _time
protected
local _time
protected
cocos2d::CCArray* _timelineList
protected
var _timelineList
protected
local _timelineList
protected
std::map<int, cocos2d::CCArray*>
_timelineMap
protected
var _timelineMap
protected
local _timelineMap
protected
float _timeSpeed
protected
var _timeSpeed
protected
local _timeSpeed
protected

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

AltStyle によって変換されたページ (->オリジナル) /