Class cc.Speed
Extends
cc.Action.
Defined in: CCAction.js.
Constructor Attributes | Constructor Name and Description |
---|---|
cc.Speed()
Changes the speed of an action, making it take longer (speed>1)
or less (speed<1) time.
|
Method Attributes | Method Name and Description |
---|---|
<static> |
cc.Speed.create(action, speed)
creates the action
|
getSpeed()
|
|
initWithAction(action, speed)
initializes the action
|
|
isDone()
|
|
reverse()
|
|
setInnerAction(action)
|
|
setSpeed(speed)
alter the speed of the inner function in runtime
|
|
startWithTarget(target)
|
|
step(dt)
|
|
stop()
Stop the action
|
- Methods borrowed from class cc.Action:
- copy, copyWithZone, description, getOriginalTarget, getTag, getTarget, release, retain, setOriginalTarget, setTag, setTarget, update
Class Detail
cc.Speed()
Changes the speed of an action, making it take longer (speed>1)
or less (speed<1) time.
Useful to simulate 'slow motion' or 'fast forward' effect.
Useful to simulate 'slow motion' or 'fast forward' effect.
Method Detail
<static>
{cc.Speed}
cc.Speed.create(action, speed)
creates the action
- Parameters:
- {cc.ActionInterval} action
- {Number} speed
- Returns:
- {cc.Speed}
{cc.ActionInterval}
getInnerAction()
- Returns:
- {cc.ActionInterval}
{Number}
getSpeed()
- Returns:
- {Number}
{Boolean}
initWithAction(action, speed)
initializes the action
- Parameters:
- {cc.ActionInterval} action
- {Number} speed
- Returns:
- {Boolean}
{Boolean}
isDone()
- Returns:
- {Boolean}
{cc.ActionInterval}
reverse()
- Returns:
- {cc.ActionInterval}
setInnerAction(action)
- Parameters:
- {cc.ActionInterval} action
setSpeed(speed)
alter the speed of the inner function in runtime
- Parameters:
- {Number} speed
startWithTarget(target)
- Parameters:
- {cc.Node} target
step(dt)
- Parameters:
- {Number} dt
stop()
Stop the action