Class cc.Animate
Extends
cc.ActionInterval.
Defined in: CCActionInterval.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Animates a sprite given the name of an Animation
|
Method Attributes | Method Name and Description |
---|---|
<static> |
cc.Animate.create(animation)
create the animate with animation
|
initWithAnimation(animation)
|
|
reverse()
|
|
setAnimation(animation)
|
|
startWithTarget(target)
|
|
stop()
stop the action
|
|
update(time)
|
- Methods borrowed from class cc.ActionInterval:
- getAmplitudeRate, getElapsed, initWithDuration, isDone, setAmplitudeRate, step
- Methods borrowed from class cc.FiniteTimeAction:
- getDuration, setDuration
- Methods borrowed from class cc.Action:
- copy, copyWithZone, description, getOriginalTarget, getTag, getTarget, release, retain, setOriginalTarget, setTag, setTarget
Method Detail
<static>
{cc.Animate}
cc.Animate.create(animation)
create the animate with animation
// example // create the animation with animation var anim = cc.Animate.create(dance_grey);
- Parameters:
- {cc.Animation} animation
- Returns:
- {cc.Animate}
{cc.Animation}
getAnimation()
- Returns:
- {cc.Animation}
{Boolean}
initWithAnimation(animation)
- Parameters:
- {cc.Animation} animation
- Returns:
- {Boolean}
{cc.ActionInterval}
reverse()
- Returns:
- {cc.ActionInterval}
setAnimation(animation)
- Parameters:
- {cc.Animation} animation
startWithTarget(target)
- Parameters:
- {cc.Sprite} target
stop()
stop the action
update(time)
- Parameters:
- {Number} time