cocos2d-x  3.0Beta0
 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)
virtual ~ProcessBase (void)
virtual void play (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 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 ()
virtual void setProcessScale (float processScale)
virtual float getProcessScale () const
virtual void setIsPause (bool pause)
virtual bool isPause () const
virtual void setIsComplete (bool complete)
virtual bool isComplete () const
virtual void setIsPlaying (bool playing)
virtual bool isPlaying () const
virtual float getCurrentPercent () const
virtual int getRawDuration () const
- Public Member Functions inherited from Object
 Object ()
 Constructor. More...
 
 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...
 
local retainCount ()
 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)

Protected Member Functions

virtual void gotoFrame (int frameIndex)
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...
 
TweenType _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...
 

Additional Inherited Members

- Public Attributes inherited from Object
unsigned int _ID
 object id, ScriptSupport need public _ID More...
 
int _luaID
 Lua reference id. More...
 
var _luaID
 Lua reference id. More...
 
local _luaID
 Lua reference id. More...
 

Constructor & Destructor Documentation

ProcessBase ( void  )
virtual ~ProcessBase ( void  )
virtual

Member Function Documentation

virtual int getCurrentFrameIndex ( )
virtual
virtual float getCurrentPercent ( ) const
inlinevirtual
virtual float getProcessScale ( ) const
inlinevirtual
virtual int getRawDuration ( ) const
inlinevirtual
virtual void gotoFrame ( int  frameIndex)
protectedvirtual
virtual bool isComplete ( ) const
inlinevirtual
virtual bool isPause ( ) const
inlinevirtual
virtual bool isPlaying ( ) const
inlinevirtual
virtual void pause ( )
virtual

Pause the Process.

Reimplemented in ArmatureAnimation.

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

Play animation by animation name.

Parameters
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 setIsComplete ( bool  complete)
inlinevirtual
virtual void setIsPause ( bool  pause)
inlinevirtual
virtual void setIsPlaying ( bool  playing)
inlinevirtual
virtual void setProcessScale ( float  processScale)
inlinevirtual
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.

TweenType _tweenEasing
protected

The tween easing effect.


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