cocos2d-x  3.0rc1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Timer Class Referenceabstract

Light-weight timer. More...

#include <CCScheduler.h>

Inheritance diagram for Timer:
Ref TimerTargetCallback TimerTargetSelector

Public Member Functions

float getInterval () const
 get interval in seconds More...
 
var getInterval ()
 get interval in seconds More...
 
local getInterval ()
 get interval in seconds More...
 
void setInterval (float interval)
 set interval in seconds More...
 
var setInterval ( var interval)
 set interval in seconds More...
 
local setInterval ( local interval)
 set interval in seconds More...
 
void setupTimerWithInterval (float seconds, unsigned int repeat, float delay)
var setupTimerWithInterval ( var seconds, var repeat, var delay)
local setupTimerWithInterval ( local seconds, local repeat, local delay)
virtual void trigger ()=0
var trigger ()
local trigger ()
virtual void cancel ()=0
local cancel ()
void update (float dt)
 triggers the timer More...
 
var update ( var dt)
 triggers the timer More...
 
local update ( local dt)
 triggers the timer More...
 
- Public Member Functions inherited from Ref
void retain ()
 Retains the ownership. More...
 
void release ()
 Release the ownership immediately. More...
 
local release ()
 Release the ownership immediately. More...
 
Refautorelease ()
 Release the ownership sometime soon automatically. More...
 
unsigned int getReferenceCount () const
 Returns the Ref's current reference count. More...
 
virtual ~Ref ()

Protected Member Functions

 Timer ()
 Timer ()
 Timer ()
- Protected Member Functions inherited from Ref
 Ref ()
 Constructor. More...
 
 Ref ()
 Constructor. More...
 

Protected Attributes

Scheduler_scheduler
local _scheduler
float _elapsed
var _elapsed
local _elapsed
bool _runForever
var _runForever
local _runForever
bool _useDelay
var _useDelay
local _useDelay
unsigned int _timesExecuted
var _timesExecuted
local _timesExecuted
unsigned int _repeat
var _repeat
local _repeat
float _delay
var _delay
local _delay
float _interval
var _interval
local _interval
- Protected Attributes inherited from Ref
unsigned int _referenceCount
 count of references More...
 

Detailed Description

Light-weight timer.

Constructor & Destructor Documentation

Timer ( )
protected
var Timer ( )
protected
local Timer ( )
protected

Member Function Documentation

virtual void cancel ( )
pure virtual
var cancel ( )
pure virtual
local cancel ( )
pure virtual
float getInterval ( ) const
inline

get interval in seconds

var getInterval ( )
inline

get interval in seconds

local getInterval ( )
inline

get interval in seconds

void setInterval ( float  interval)
inline

set interval in seconds

var setInterval ( var  interval)
inline

set interval in seconds

local setInterval ( local  interval)
inline

set interval in seconds

void setupTimerWithInterval ( float  seconds,
unsigned int  repeat,
float  delay 
)
var setupTimerWithInterval ( var  seconds,
var  repeat,
var  delay 
)
local setupTimerWithInterval ( local  seconds,
local  repeat,
local  delay 
)
virtual void trigger ( )
pure virtual
var trigger ( )
pure virtual
local trigger ( )
pure virtual
void update ( float  dt)

triggers the timer

var update ( var  dt)

triggers the timer

local update ( local  dt)

triggers the timer

Member Data Documentation

float _delay
protected
var _delay
protected
local _delay
protected
float _elapsed
protected
var _elapsed
protected
local _elapsed
protected
float _interval
protected
var _interval
protected
local _interval
protected
unsigned int _repeat
protected
var _repeat
protected
local _repeat
protected
bool _runForever
protected
var _runForever
protected
local _runForever
protected
Scheduler* _scheduler
protected
var _scheduler
protected
local _scheduler
protected
unsigned int _timesExecuted
protected
var _timesExecuted
protected
local _timesExecuted
protected
bool _useDelay
protected
var _useDelay
protected
local _useDelay
protected

The documentation for this class was generated from the following file: