cocos2d-x  3.4
 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 ()
 TimerTargetCallback ()
 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...
 
var initWithCallback ( var scheduler, var callback, var target, var key, var seconds, var repeat, var 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...
 
local initWithCallback ( local scheduler, local callback, local target, local key, local seconds, local repeat, local 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
var getKey ()
local getKey ()
virtual void trigger () override
var trigger ()
local trigger ()
virtual void cancel () override
local cancel ()
- 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
var _callback
local _callback
std::string _key
var _key
local _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...
 
var _referenceCount
 count of references More...
 
local _referenceCount
 count of references More...
 

Additional Inherited Members

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

Constructor & Destructor Documentation

Member Function Documentation

virtual void cancel ( )
overridevirtual

Implements Timer.

var cancel ( )
overridevirtual

Implements Timer.

local cancel ( )
overridevirtual

Implements Timer.

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

var initWithCallback ( var  scheduler,
var  callback,
var  target,
var  key,
var  seconds,
var  repeat,
var  delay 
)

Initializes a timer with a target, a lambda and an interval in seconds, repeat in number of times to repeat, delay in seconds.

local initWithCallback ( local  scheduler,
local  callback,
local  target,
local  key,
local  seconds,
local  repeat,
local  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.

var trigger ( )
overridevirtual

Implements Timer.

local trigger ( )
overridevirtual

Implements Timer.

Member Data Documentation

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

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