Class Index | File Index

Classes


Class cc.Timer


Extends cc.Class.

Defined in: CCScheduler.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Light weight timer
Method Summary
Method Attributes Method Name and Description
 
ctor()
cc.Timer's Constructor Constructor
 
returns interval of timer
 
initWithTarget(target, selector, seconds, repeat, delay)
Initializes a timer with a target, a selector and an interval in seconds.
<static>  
cc.Timer.timerWithTarget(target, selector, seconds)
Allocates a timer with a target, a selector and an interval in seconds.
 
update(dt)
triggers the timer
Class Detail
cc.Timer()
Light weight timer
Method Detail
ctor()
cc.Timer's Constructor Constructor

{Number} getInterval()
returns interval of timer
Returns:
{Number}

{Boolean} initWithTarget(target, selector, seconds, repeat, delay)
Initializes a timer with a target, a selector and an interval in seconds.
Parameters:
{cc.Class} target
target
{String|function} selector
Selector
{Number} seconds
second
repeat
delay
Returns:
{Boolean} true if inintialized *

<static> {cc.Timer} cc.Timer.timerWithTarget(target, selector, seconds)
Allocates a timer with a target, a selector and an interval in seconds.
Parameters:
{cc.Class} target
{String|function} selector
Selector
{Number} seconds
Returns:
{cc.Timer} a cc.Timer instance

update(dt)
triggers the timer
Parameters:
{Number} dt
delta time

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