cocos2d-x  2.2.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CCProcessBase Class Reference

#include <CCProcessBase.h>

Inheritance diagram for CCProcessBase:
CCObject CCCopying CCArmatureAnimation CCTween

Public Member Functions

 CCProcessBase (void)
 ~CCProcessBase (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 ()
- 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)
- Public Member Functions inherited from CCCopying
virtual CCObjectcopyWithZone (CCZone *pZone)

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...
 
- Public Attributes inherited from CCObject
unsigned int m_uID
int m_nLuaID

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 m_fProcessScale
 Scale the process speed. More...
 
bool m_bIsPause
 Set and get whether the aniamtion is pause. More...
 
bool m_bIsComplete
 Set and get whether the aniamtion is complete. More...
 
bool m_bIsPlaying
 Set and get whether the aniamtion is playing. More...
 
float m_fCurrentPercent
 Current percent this process arrived. More...
 
int m_iRawDuration
 The raw duration. More...
 
AnimationType m_eLoopType
 The animation whether or not loop. More...
 
CCTweenType m_eTweenEasing
 The tween easing effect. More...
 
int m_iDurationTween
 The durantion frame count will run. More...
 
float m_fCurrentFrame
 Current frame this process arrived, this frame is tween frame. More...
 
int m_iCurFrameIndex
 Frame index it the time line. More...
 
int m_iNextFrameIndex
 Next frame this process need run to. More...
 
bool m_bIsLoopBack
float m_fAnimationInternal
 The animation update speed. More...
 
- Protected Attributes inherited from CCObject
unsigned int m_uReference
unsigned int m_uAutoReleaseCount

Constructor & Destructor Documentation

CCProcessBase ( void  )
~CCProcessBase ( void  )

Member Function Documentation

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

Pause the Process.

Reimplemented in CCArmatureAnimation.

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 CCMovementData 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 CCMovementData get from flash design panel

Parameters
loopWhether the animation is loop
    loop < 0 : use the value from CCMovementData get from flash design panel
    loop = 0 : this animation is not loop
    loop > 0 : this animation is loop
tweenEasingCCTween easing is used for calculate easing effect
    TWEEN_EASING_MAX : use the value from CCMovementData 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 CCArmatureAnimation.

virtual void stop ( )
virtual

Stop the Process.

Reimplemented in CCArmatureAnimation.

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 CCObject.

Reimplemented in CCArmatureAnimation.

virtual void updateHandler ( )
inlineprotectedvirtual

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

Reimplemented in CCArmatureAnimation, and CCTween.

Member Data Documentation

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

bool m_bIsComplete
protected

Set and get whether the aniamtion is complete.

bool m_bIsLoopBack
protected
bool m_bIsPause
protected

Set and get whether the aniamtion is pause.

bool m_bIsPlaying
protected

Set and get whether the aniamtion is playing.

AnimationType m_eLoopType
protected

The animation whether or not loop.

CCTweenType m_eTweenEasing
protected

The tween easing effect.

float m_fAnimationInternal
protected

The animation update speed.

float m_fCurrentFrame
protected

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

float m_fCurrentPercent
protected

Current percent this process arrived.

float m_fProcessScale
protected

Scale the process speed.

int m_iCurFrameIndex
protected

Frame index it the time line.

int m_iDurationTween
protected

The durantion frame count will run.

int m_iNextFrameIndex
protected

Next frame this process need run to.

int m_iRawDuration
protected

The raw duration.


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