cocos2d-x  3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TimerTargetCallback Class Reference

#include <CCScheduler.h>

Inheritance diagram for TimerTargetCallback:
Timer Ref

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 ccSchedulerFuncgetCallback () 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...
 
Refautorelease ()
 Releases the ownership sometime soon automatically. More...
 
unsigned int getReferenceCount () const
 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...
 

Additional Inherited Members

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

Constructor & Destructor Documentation

Member Function Documentation

virtual void cancel ( )
overridevirtual

Implements Timer.

const ccSchedulerFunc& getCallback ( ) const
inline
const std::string& getKey ( ) const
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.

virtual void trigger ( )
overridevirtual

Implements Timer.

Member Data Documentation

ccSchedulerFunc _callback
protected
std::string _key
protected
void* _target
protected

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