Class cc.Animate
- Defined in: CCActionInterval.js
- Extends cc.ActionInterval
Constructor Attributes | Constructor Name and Description |
---|---|
cc.Animate(animation)
Animates a sprite given the name of an Animation
|
Method Summary
Class Detail
cc.Animate(animation)
Animates a sprite given the name of an Animation
// create the animation with animation var anim = new cc.Animate(dance_grey);
- Parameters:
- {cc.Animation} animation
Field Detail
Please use cc.animate instead
create the animate with animation
- Deprecated:
- since v3.0 please use cc.animate instead.
Method Detail
-
{cc.Animate} clone()returns a new clone of the action
- Returns:
- {cc.Animate}
-
ctor(animation)Constructor function, override it to extend the construction behavior, remember to call "this._super()" in the extended "ctor" function.
create the animate with animation.- Parameters:
- {cc.Animation} animation
-
{cc.Animation} getAnimation()
- Returns:
- {cc.Animation}
-
{Number} getCurrentFrameIndex()Gets the index of sprite frame currently displayed.
- Returns:
- {Number}
-
{Boolean} initWithAnimation(animation)
- Parameters:
- {cc.Animation} animation
- Returns:
- {Boolean}
-
{cc.Animate} reverse()Returns a reversed action.
- Returns:
- {cc.Animate}
-
setAnimation(animation)
- Parameters:
- {cc.Animation} animation
-
startWithTarget(target)Start the action with target.
- Parameters:
- {cc.Sprite} target
-
stop()stop the action
-
update(dt)Called once per frame. Time is the number of seconds of a frame interval.
- Parameters:
- {Number} dt