axmol/tools/tolua++/CCScheduler.pkg

83 lines
2.1 KiB
Plaintext

namespace cocos2d {
class CCTimer : public CCObject
{
CCTimer(void);
ccTime getInterval(void);
void setInterval(ccTime fInterval);
//bool initWithTarget(SelectorProtocol *pTarget, SEL_SCHEDULE pfnSelector);
//bool initWithTarget(SelectorProtocol *pTarget, SEL_SCHEDULE pfnSelector, ccTime fSeconds);
void update(ccTime dt);
//static CCTimer* timerWithTarget(SelectorProtocol *pTarget, SEL_SCHEDULE pfnSelector);
//static CCTimer* timerWithTarget(SelectorProtocol *pTarget, SEL_SCHEDULE pfnSelector, ccTime fSeconds);
static CCTimer* timerWithScript(SelectorProtocol* pTarget, const char* szFuncName, ccTime fSeconds);
bool initWithScript(SelectorProtocol* pTarget, const char* szFuncName, ccTime fSeconds);
bool isScriptFuncExist( const char* szFuncName);
//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, SelectorProtocol *pTarget, ccTime fInterval, bool bPaused, const char* szScriptFunc);
void scheduleUpdateForTarget(SelectorProtocol *pTarget, int nPriority, bool bPaused);
void unscheduleSelector(SEL_SCHEDULE pfnSelector, SelectorProtocol *pTarget, const char* szScriptFunc);
void unscheduleSelector(SEL_SCHEDULE pfnSelector, SelectorProtocol *pTarget);
void unscheduleUpdateForTarget(const SelectorProtocol *pTarget);
void unscheduleAllSelectorsForTarget(SelectorProtocol *pTarget);
void unscheduleAllSelectors(void);
void pauseTarget(SelectorProtocol *pTarget);
void resumeTarget(SelectorProtocol *pTarget);
void scheduleTimer(CCTimer *pTimer);
void unscheduleTimer(CCTimer *pTimer);
void unscheduleAllTimers(void);
static CCScheduler* sharedScheduler(void);
/** purges the shared scheduler. It releases the retained instance.
@since v0.99.0
*/
static void purgeSharedScheduler(void);
};
}//namespace cocos2d