cocos2d-x
3.3
|
Light-weight timer. More...
#include <CCScheduler.h>
Public Member Functions | |
float | getInterval () const |
get interval in seconds More... | |
void | setInterval (float interval) |
set interval in seconds More... | |
void | setupTimerWithInterval (float seconds, unsigned int repeat, float delay) |
virtual void | trigger ()=0 |
virtual void | cancel ()=0 |
void | update (float dt) |
triggers the timer More... | |
Public Member Functions inherited from Ref | |
void | retain () |
Retains the ownership. More... | |
void | release () |
Releases the ownership immediately. More... | |
Ref * | autorelease () |
Releases the ownership sometime soon automatically. More... | |
unsigned int | getReferenceCount () const |
Returns the Ref's current reference count. More... | |
virtual | ~Ref () |
NA NA More... | |
Protected Member Functions | |
Timer () | |
Protected Member Functions inherited from Ref | |
Ref () | |
Constructor. More... | |
Protected Attributes | |
Scheduler * | _scheduler |
float | _elapsed |
bool | _runForever |
bool | _useDelay |
unsigned int | _timesExecuted |
unsigned int | _repeat |
float | _delay |
float | _interval |
Protected Attributes inherited from Ref | |
unsigned int | _referenceCount |
count of references More... | |
Light-weight timer.
|
protected |
|
pure virtual |
Implemented in TimerTargetCallback, and TimerTargetSelector.
|
inline |
get interval in seconds
|
inline |
set interval in seconds
void setupTimerWithInterval | ( | float | seconds, |
unsigned int | repeat, | ||
float | delay | ||
) |
|
pure virtual |
Implemented in TimerTargetCallback, and TimerTargetSelector.
void update | ( | float | dt | ) |
triggers the timer
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |