Class cc.ActionInterval
Extends
cc.FiniteTimeAction.
Defined in: CCActionInterval.js.
Constructor Attributes | Constructor Name and Description |
---|---|
An interval action is an action that takes place within a certain period of time. |
Method Attributes | Method Name and Description |
---|---|
<static> |
cc.ActionInterval.create(d)
|
how many seconds had elapsed since the actions started to run.
|
|
initializes the action
|
|
isDone()
returns true if the action has finished
|
|
reverse()
|
|
setAmplitudeRate(amp)
|
|
startWithTarget(target)
|
|
step(dt)
|
- 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, stop, update
An interval action is an action that takes place within a certain period of time.
It has an start time, and a finish time. The finish time is the parameter
duration plus the start time.
These CCActionInterval actions have some interesting properties, like:
- They can run normally (default)
- They can run reversed with the reverse method
- They can run with the time altered with the Accelerate, AccelDeccel and Speed actions.
For example, you can simulate a Ping Pong effect running the action normally and
then running it again in Reverse mode.
// example var actionInterval = cc.ActionInterval.create(3);
- Parameters:
- {Number} d
- duration in seconds
- Returns:
- {cc.ActionInterval}
- Returns:
- {Number}
- Returns:
- {Number}
- Parameters:
- {Number} d
- duration in seconds
- Returns:
- {Boolean}
- Returns:
- {Boolean}
- Returns:
- {Null}
- Parameters:
- {Number} amp
- Parameters:
- {cc.Node} target
- Parameters:
- {Number} dt
- delta time in seconds