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

#include <CCProcessBase.h>

Inheritance diagram for ProcessBase:
Object ArmatureAnimation Tween

Public Member Functions

 ProcessBase (void)
 ~ProcessBase (void)
virtual void play (void *animation, int durationTo, int durationTween, int loop, int tweenEasing)
 Play animation by animation name. More...
 
virtual void pause ()
 Pause the Process. More...
 
virtual void resume ()
 Resume the Process. More...
 
virtual void stop ()
 Stop the Process. More...
 
virtual void gotoFrame (int frameIndex)
virtual void update (float dt)
 You should never call this function, unless you know what you do Update the Process, include current process, current frame and son on. More...
 
virtual int getCurrentFrameIndex ()
- 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)

Public Attributes

virtual float getProcessScale (void)\n\n public
 getProcessScale More...
 
virtual bool getIsPause (void)\n\n public
 getIsPause More...
 
virtual bool getIsComplete (void)\n\n public
 getIsComplete More...
 
virtual bool getIsPlaying (void)\n\n public
 getIsPlaying More...
 
virtual float getCurrentPercent (void)\n\n public
 getCurrentPercent More...
 
virtual int getRawDuration (void)\n\n public
 getRawDuration More...
 
virtual AnimationType getLoopType (void)\n\n public
 getLoopType More...
 
virtual CCTweenType getTweenEasing (void)\n\n public
 getTweenEasing More...
 
virtual float getAnimationInternal (void)\n\n public
 getAnimationInternal More...
 
- Public Attributes inherited from Object
unsigned int _ID
 object id, ScriptSupport need public _ID More...
 
int _luaID
 Lua reference id. More...
 

Protected Member Functions

virtual void updateHandler ()
 Update(float dt) will call this handler, you can handle your logic here. More...
 

Protected Attributes

float _processScale
 Scale the process speed. More...
 
bool _isPause
 Set and get whether the aniamtion is pause. More...
 
bool _isComplete
 Set and get whether the aniamtion is complete. More...
 
bool _isPlaying
 Set and get whether the aniamtion is playing. More...
 
float _currentPercent
 Current percent this process arrived. More...
 
int _rawDuration
 The raw duration. More...
 
AnimationType _loopType
 The animation whether or not loop. More...
 
CCTweenType _tweenEasing
 The tween easing effect. More...
 
float _animationInternal
 The animation update speed. More...
 
int _durationTween
 The durantion frame count will run. More...
 
float _currentFrame
 Current frame this process arrived, this frame is tween frame. More...
 
int _curFrameIndex
 Frame index it the time line. More...
 
int _nextFrameIndex
 Next frame this process need run to. More...
 
bool _isLoopBack
- Protected Attributes inherited from Object
unsigned int _reference
 count of references More...
 
var _reference
 count of references More...
 
local _reference
 count of references More...
 
unsigned int _autoReleaseCount
 count of autorelease More...
 
var _autoReleaseCount
 count of autorelease More...
 
local _autoReleaseCount
 count of autorelease More...
 

Constructor & Destructor Documentation

ProcessBase ( void  )
~ProcessBase ( void  )

Member Function Documentation

virtual int getCurrentFrameIndex ( )
virtual
virtual void gotoFrame ( int  frameIndex)
virtual
virtual void pause ( )
virtual

Pause the Process.

Reimplemented in ArmatureAnimation.

virtual void play ( void *  animation,
int  durationTo,
int  durationTween,
int  loop,
int  tweenEasing 
)
virtual

Play animation by animation name.

Parameters
animationIt will not used in the ProcessBase Class
durationToThe frames between two animation changing-over. It's meaning is changing to this animation need how many frames

-1 : use the value from MovementData get from flash design panel

Parameters
durationTweenThe frame count you want to play in the game. if _durationTween is 80, then the animation will played 80 frames in a loop

-1 : use the value from MovementData get from flash design panel

Parameters
loopWhether the animation is loop
    loop < 0 : use the value from MovementData get from flash design panel
    loop = 0 : this animation is not loop
    loop > 0 : this animation is loop
tweenEasingTween easing is used for calculate easing effect
    TWEEN_EASING_MAX : use the value from MovementData get from flash design panel
    -1 : fade out
    0  : line
    1  : fade in
    2  : fade in and out
virtual void resume ( )
virtual

Resume the Process.

Reimplemented in ArmatureAnimation.

virtual void stop ( )
virtual

Stop the Process.

Reimplemented in ArmatureAnimation.

virtual void update ( float  dt)
virtual

You should never call this function, unless you know what you do Update the Process, include current process, current frame and son on.

Parameters
Theduration since last update

Reimplemented from Object.

Reimplemented in ArmatureAnimation.

virtual void updateHandler ( )
inlineprotectedvirtual

Update(float dt) will call this handler, you can handle your logic here.

Reimplemented in ArmatureAnimation, and Tween.

Member Data Documentation

float _animationInternal
protected

The animation update speed.

int _curFrameIndex
protected

Frame index it the time line.

float _currentFrame
protected

Current frame this process arrived, this frame is tween frame.

float _currentPercent
protected

Current percent this process arrived.

int _durationTween
protected

The durantion frame count will run.

bool _isComplete
protected

Set and get whether the aniamtion is complete.

bool _isLoopBack
protected
bool _isPause
protected

Set and get whether the aniamtion is pause.

bool _isPlaying
protected

Set and get whether the aniamtion is playing.

AnimationType _loopType
protected

The animation whether or not loop.

int _nextFrameIndex
protected

Next frame this process need run to.

float _processScale
protected

Scale the process speed.

int _rawDuration
protected

The raw duration.

CCTweenType _tweenEasing
protected

The tween easing effect.

virtual float
getAnimationInternal(void)\n\n
public

getAnimationInternal

setAnimationInternal

virtual float
getCurrentPercent(void)\n\n
public

getCurrentPercent

setCurrentPercent

virtual bool getIsComplete(void)\n\n
public

getIsComplete

setIsComplete

virtual bool getIsPause(void)\n\n
public

getIsPause

setIsPause

virtual bool getIsPlaying(void)\n\n
public

getIsPlaying

setIsPlaying

virtual AnimationType
getLoopType(void)\n\n public

getLoopType

setLoopType

virtual float getProcessScale(void)\n\n
public

getProcessScale

setProcessScale

virtual int getRawDuration(void)\n\n
public

getRawDuration

setRawDuration

virtual CCTweenType
getTweenEasing(void)\n\n
public

getTweenEasing

setTweenEasing


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