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
 NA NA More...
 
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...
 
void setInterval (float interval)
 set interval in seconds More...
 
void setupTimerWithInterval (float seconds, unsigned int repeat, float delay)
 
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...
 
Refautorelease ()
 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 Attributes

void * _target
 
ccSchedulerFunc _callback
 
std::string _key
 
- Protected Attributes inherited from Timer
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...
 

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

NA NA

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: