|
cocos2d-x
2.2.3-gd2.113-rev1ec524e
|
Light-weight timer. More...
#include <CCScheduler.h>
Public Member Functions | |
| CCTimer (void) | |
| ctor NA More... | |
| float | getInterval (void) const |
| get interval in seconds More... | |
| void | setInterval (float fInterval) |
| set interval in seconds More... | |
| SEL_SCHEDULE | getSelector () const |
| NA. More... | |
| bool | initWithTarget (CCObject *pTarget, SEL_SCHEDULE pfnSelector) |
| Initializes a timer with a target and a selector. More... | |
| bool | initWithTarget (CCObject *pTarget, SEL_SCHEDULE pfnSelector, float fSeconds, unsigned int nRepeat, float fDelay) |
| Initializes a timer with a target, a selector and an interval in seconds, repeat in number of times to repeat, delay in seconds. More... | |
| bool | initWithScriptHandler (int nHandler, float fSeconds) |
| Initializes a timer with a script callback function and an interval in seconds. More... | |
| void | update (float dt) |
| triggers the timer More... | |
| int | getScriptHandler () |
| NA. More... | |
Public Member Functions inherited from CCObject | |
| CCObject (void) | |
| virtual | ~CCObject (void) |
| NA. More... | |
| void | release (void) |
| void | retain (void) |
| CCObject * | autorelease (void) |
| CCObject * | copy (void) |
| bool | isSingleReference (void) const |
| unsigned int | retainCount (void) const |
| virtual bool | isEqual (const CCObject *pObject) |
| virtual void | acceptVisitor (CCDataVisitor &visitor) |
| virtual void | update (float dt) |
| CCObject (const CCObject &) | |
| CCObject & | operator= (const CCObject &) |
| virtual void | encodeWithCoder (DS_Dictionary *) |
| virtual bool | canEncode () |
| CCObjectType | getObjType () const |
| virtual int | getTag () const |
| virtual void | setTag (int nTag) |
| void | setObjType (CCObjectType) |
Public Member Functions inherited from CCCopying | |
| virtual CCObject * | copyWithZone (CCZone *pZone) |
Static Public Member Functions | |
| static CCTimer * | timerWithTarget (CCObject *pTarget, SEL_SCHEDULE pfnSelector) |
| Allocates a timer with a target and a selector. More... | |
| static CCTimer * | timerWithTarget (CCObject *pTarget, SEL_SCHEDULE pfnSelector, float fSeconds) |
| Allocates a timer with a target, a selector and an interval in seconds. More... | |
| static CCTimer * | timerWithScriptHandler (int nHandler, float fSeconds) |
| Allocates a timer with a script callback function and an interval in seconds. More... | |
Static Public Member Functions inherited from CCObject | |
| static CCObject * | createWithCoder (DS_Dictionary *) |
Protected Attributes | |
| CCObject * | m_pTarget |
| float | m_fElapsed |
| bool | m_bRunForever |
| bool | m_bUseDelay |
| unsigned int | m_uTimesExecuted |
| unsigned int | m_uRepeat |
| float | m_fDelay |
| float | m_fInterval |
| SEL_SCHEDULE | m_pfnSelector |
| int | m_nScriptHandler |
Protected Attributes inherited from CCObject | |
| unsigned int | m_uReference |
| unsigned int | m_uAutoReleaseCount |
| int | m_nTag |
| int | m_eObjType |
| unsigned int | m_uObjectIdxInArray |
Additional Inherited Members | |
Public Attributes inherited from CCObject | |
| unsigned int | m_uID |
| int | m_nLuaID |
Light-weight timer.
| CCTimer | ( | void | ) |
ctor NA
| float getInterval | ( | void | ) | const |
get interval in seconds
|
inline |
NA.
| SEL_SCHEDULE getSelector | ( | ) | const |
NA.
| bool initWithScriptHandler | ( | int | nHandler, |
| float | fSeconds | ||
| ) |
Initializes a timer with a script callback function and an interval in seconds.
| bool initWithTarget | ( | CCObject * | pTarget, |
| SEL_SCHEDULE | pfnSelector | ||
| ) |
Initializes a timer with a target and a selector.
NA
| bool initWithTarget | ( | CCObject * | pTarget, |
| SEL_SCHEDULE | pfnSelector, | ||
| float | fSeconds, | ||
| unsigned int | nRepeat, | ||
| float | fDelay | ||
| ) |
Initializes a timer with a target, a selector and an interval in seconds, repeat in number of times to repeat, delay in seconds.
NA
| void setInterval | ( | float | fInterval | ) |
set interval in seconds
|
static |
Allocates a timer with a script callback function and an interval in seconds.
|
static |
Allocates a timer with a target and a selector.
NA
|
static |
Allocates a timer with a target, a selector and an interval in seconds.
NA
|
virtual |
triggers the timer
Reimplemented from CCObject.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |