axmol/tools/tolua++/CCScheduler.pkg

76 lines
1.8 KiB
Plaintext
Raw Normal View History

2011-06-14 14:31:25 +08:00
namespace cocos2d {
class CCTimer : public CCObject
{
CCTimer(void);
ccTime getInterval(void);
void setInterval(ccTime fInterval);
//bool initWithTarget(CCObject *pTarget, SEL_SCHEDULE pfnSelector);
2011-06-14 14:31:25 +08:00
//bool initWithTarget(CCObject *pTarget, SEL_SCHEDULE pfnSelector, ccTime fSeconds);
2011-06-14 14:31:25 +08:00
void update(ccTime dt);
//static CCTimer* timerWithTarget(CCObject *pTarget, SEL_SCHEDULE pfnSelector);
2011-06-14 14:31:25 +08:00
//static CCTimer* timerWithTarget(CCObject *pTarget, SEL_SCHEDULE pfnSelector, ccTime fSeconds);
2011-06-20 17:31:38 +08:00
bool initWithScriptFuncName(const char *pszFuncName, ccTime fSeconds);
bool initWithScriptFuncName(const char *pszFuncName, ccTime fSeconds);
2011-06-14 14:31:25 +08:00
//SEL_SCHEDULE m_pfnSelector;
ccTime m_fInterval;
std::string m_scriptFunc;
};
class CCScheduler : public CCObject
{
~CCScheduler(void);
ccTime getTimeScale(void);
void setTimeScale(ccTime fTimeScale);
void tick(ccTime dt);
void scheduleSelector(SEL_SCHEDULE pfnSelector, CCObject *pTarget, ccTime fInterval, bool bPaused);
2011-06-20 17:31:38 +08:00
void scheduleScriptFunc(const char *pszFuncName, ccTime fInterval, bool bPaused);
void unscheduleScriptFunc(const char *pszFuncName);
void scheduleUpdateForTarget(CCObject *pTarget, int nPriority, bool bPaused);
2011-06-14 14:31:25 +08:00
void unscheduleSelector(SEL_SCHEDULE pfnSelector, CCObject *pTarget);
2011-06-14 14:31:25 +08:00
void unscheduleUpdateForTarget(const CCObject *pTarget);
2011-06-14 14:31:25 +08:00
void unscheduleAllSelectorsForTarget(CCObject *pTarget);
2011-06-14 14:31:25 +08:00
void unscheduleAllSelectors(void);
void pauseTarget(CCObject *pTarget);
2011-06-14 14:31:25 +08:00
void resumeTarget(CCObject *pTarget);
2011-06-14 14:31:25 +08:00
bool isTargetPaused(CCObject *pTarget);
2011-06-14 14:31:25 +08:00
static CCScheduler* sharedScheduler(void);
/** purges the shared scheduler. It releases the retained instance.
@since v0.99.0
*/
static void purgeSharedScheduler(void);
};
}//namespace cocos2d