cocos2d-x
3.3
|
Animate3D, Animates a Sprite3D given with an Animation3D. More...
#include <CCAnimate3D.h>
Public Member Functions | |
virtual void | stop () override |
called after the action has finished. More... | |
virtual void | step (float dt) override |
called every frame with it's delta time. DON'T override unless you know what you are doing. More... | |
virtual void | startWithTarget (Node *target) override |
called before the action start. It will also set the target. More... | |
virtual Animate3D * | reverse () const override |
returns a new action that performs the exactly the reverse action More... | |
virtual Animate3D * | clone () const override |
returns a clone of action More... | |
virtual void | update (float t) override |
called once per frame. More... | |
float | getSpeed () const |
get & set speed, negative speed means playing reverse More... | |
void | setSpeed (float speed) |
float | getWeight () const |
get & set blend weight, weight must positive More... | |
void | setWeight (float weight) |
bool | getPlayBack () const |
get & set play reverse, these are deprecated, use set negative speed instead More... | |
void | setPlayBack (bool reverse) |
virtual | ~Animate3D () |
void | removeFromMap () |
![]() | |
float | getElapsed (void) |
how many seconds had elapsed since the actions started to run. More... | |
void | setAmplitudeRate (float amp) |
float | getAmplitudeRate (void) |
virtual bool | isDone (void) const override |
return true if the action has finished More... | |
![]() | |
float | getDuration () const |
get duration in seconds of the action More... | |
void | setDuration (float duration) |
set duration in seconds of the action More... | |
![]() | |
virtual std::string | description () const |
NA NA More... | |
Node * | getTarget () const |
void | setTarget (Node *target) |
The action will modify the target properties. More... | |
Node * | getOriginalTarget () const |
void | setOriginalTarget (Node *originalTarget) |
Set the original target, since target can be nil. More... | |
int | getTag () const |
void | setTag (int tag) |
virtual | ~Action () |
![]() | |
void | retain () |
Retains the ownership. More... | |
void | release () |
Releases the ownership immediately. More... | |
Ref * | autorelease () |
Releases the ownership sometime soon automatically. More... | |
unsigned int | getReferenceCount () const |
Returns the Ref's current reference count. More... | |
virtual | ~Ref () |
NA NA More... | |
![]() | |
virtual | ~Clonable () |
NA NA More... | |
Ref * | copy () const |
returns a copy of the Ref. More... | |
Static Public Member Functions | |
static Animate3D * | create (Animation3D *animation) |
create Animate3D using Animation. More... | |
static Animate3D * | create (Animation3D *animation, float fromTime, float duration) |
create Animate3D More... | |
static Animate3D * | createWithFrames (Animation3D *animation, int startFrame, int endFrame, float frameRate=30.f) |
create Animate3D by frame section, [startFrame, endFrame) More... | |
static float | getTransitionTime () |
animate transition time More... | |
Public Attributes | |
CC_CONSTRUCTOR_ACCESS | __pad0__: Animate3D() |
![]() | |
CC_CONSTRUCTOR_ACCESS | __pad0__: bool initWithDuration(float d) |
![]() | |
CC_CONSTRUCTOR_ACCESS | __pad0__: FiniteTimeAction() : _duration(0) {} virtual ~FiniteTimeAction(){}protected: float _duration |
![]() | |
CC_CONSTRUCTOR_ACCESS | __pad0__: Action() |
Protected Types | |
enum | Animate3DState { FadeIn, FadeOut, Running } |
Protected Attributes | |
Animate3DState | _state |
Animation3D * | _animation |
float | _absSpeed |
float | _weight |
float | _start |
float | _last |
bool | _playReverse |
float | _accTransTime |
float | _lastTime |
std::unordered_map< Bone3D *, Animation3D::Curve * > | _boneCurves |
![]() | |
float | _elapsed |
bool | _firstTick |
![]() | |
Node * | _originalTarget |
Node * | _target |
The "target". More... | |
int | _tag |
The action tag. More... | |
![]() | |
unsigned int | _referenceCount |
count of references More... | |
Static Protected Attributes | |
static float | _transTime |
static std::unordered_map < Sprite3D *, Animate3D * > | s_fadeInAnimates |
static std::unordered_map < Sprite3D *, Animate3D * > | s_fadeOutAnimates |
static std::unordered_map < Sprite3D *, Animate3D * > | s_runningAnimates |
Additional Inherited Members | |
![]() | |
static const int | INVALID_TAG = -1 |
Default tag used for all the actions. More... | |
![]() | |
Ref () | |
Constructor. More... | |
Animate3D, Animates a Sprite3D given with an Animation3D.
|
strongprotected |
|
virtual |
|
overridevirtual |
returns a clone of action
Reimplemented from ActionInterval.
|
static |
|
static |
|
static |
|
inline |
get & set play reverse, these are deprecated, use set negative speed instead
float getSpeed | ( | ) | const |
get & set speed, negative speed means playing reverse
|
inlinestatic |
animate transition time
|
inline |
get & set blend weight, weight must positive
void removeFromMap | ( | ) |
|
overridevirtual |
returns a new action that performs the exactly the reverse action
Reimplemented from ActionInterval.
|
inline |
void setSpeed | ( | float | speed | ) |
void setWeight | ( | float | weight | ) |
|
overridevirtual |
called before the action start. It will also set the target.
Reimplemented from ActionInterval.
|
overridevirtual |
called every frame with it's delta time. DON'T override unless you know what you are doing.
Reimplemented from ActionInterval.
|
overridevirtual |
called after the action has finished.
It will set the 'target' to nil. IMPORTANT: You should never call "[action stop]" manually. Instead, use: "target->stopAction(action);"
Reimplemented from Action.
|
overridevirtual |
called once per frame.
time a value between 0 and 1
For example:
Reimplemented from Action.
CC_CONSTRUCTOR_ACCESS __pad0__ |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |