Class Index | File Index

Classes


Class cc.ActionInterval


Extends cc.FiniteTimeAction.

Defined in: CCActionInterval.js.

Class Summary
Constructor Attributes Constructor Name and Description
 

An interval action is an action that takes place within a certain period of time.

Method Summary
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
 
returns true if the action has finished
 
 
 
 
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
Class Detail
cc.ActionInterval()

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.

Method Detail
<static> {cc.ActionInterval} cc.ActionInterval.create(d)
// example
var actionInterval = cc.ActionInterval.create(3);
Parameters:
{Number} d
duration in seconds
Returns:
{cc.ActionInterval}

{Number} getAmplitudeRate()
Returns:
{Number}

{Number} getElapsed()
how many seconds had elapsed since the actions started to run.
Returns:
{Number}

{Boolean} initWithDuration(d)
initializes the action
Parameters:
{Number} d
duration in seconds
Returns:
{Boolean}

{Boolean} isDone()
returns true if the action has finished
Returns:
{Boolean}

{Null} reverse()
Returns:
{Null}

setAmplitudeRate(amp)
Parameters:
{Number} amp

startWithTarget(target)
Parameters:
{cc.Node} target

step(dt)
Parameters:
{Number} dt
delta time in seconds

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Jan 09 2013 07:51:50 GMT-0800 (PST)