#include <CCScheduler.h>
Public Member Functions | |
TimerTargetCallback () | |
bool | initWithCallback (Scheduler *scheduler, const ccSchedulerFunc &callback, void *target, const std::string &key, float seconds, unsigned int repeat, float delay) |
Initializes a timer with a target, a lambda and an interval in seconds, repeat in number of times to repeat, delay in seconds. More... | |
const ccSchedulerFunc & | getCallback () const |
const std::string & | getKey () const |
virtual void | trigger () override |
virtual void | cancel () override |
Public Member Functions inherited from Timer | |
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) |
local | setupTimerWithInterval ( local seconds, local repeat, local delay) |
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 () |
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... | |
local | getReferenceCount () |
Returns the Ref's current reference count. More... | |
virtual | ~Ref () |
Protected Attributes | |
void * | _target |
ccSchedulerFunc | _callback |
std::string | _key |
Protected Attributes inherited from Timer | |
Scheduler * | _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... | |
local | _referenceCount |
count of references More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Timer | |
Timer () | |
Timer () | |
Timer () | |
Protected Member Functions inherited from Ref | |
Ref () | |
Constructor. More... | |
Ref () | |
Constructor. More... | |
|
overridevirtual |
Implements Timer.
|
inline |
|
inline |
bool initWithCallback | ( | Scheduler * | scheduler, |
const ccSchedulerFunc & | callback, | ||
void * | target, | ||
const std::string & | key, | ||
float | seconds, | ||
unsigned int | repeat, | ||
float | delay | ||
) |
Initializes a timer with a target, a lambda and an interval in seconds, repeat in number of times to repeat, delay in seconds.
|
overridevirtual |
Implements Timer.
|
protected |
|
protected |
|
protected |