Cocos2dx native Lua for timer writing:
1. Call each frame:
Void scheduleupdatewithpriority (INT priority)
Void scheduleupdatewithprioritylua (INT nhandler, int priority)
2. Specify the call interval:
Unsigned int schedulescriptfunc (unsigned int nhandler, float finterval, bool bpaused)
3. Cancel the timer event
Void unschedulescriptentry (unsigned int uschedulescriptentryid)
Quick calls to schedule:
First introduce this module,
Local scheduler = require ("framework. scheduler ")
1. Call each frame:
Schedbal. scheduleupdateglobal (oninterval)
2. Specify the call interval:
Schedval. scheduleglobal (oninterval, time)
Scheday. receivmwithdelayglobal (oninterval, time)
3. Cancel the timer event
Schedglobal. unscheduleglobal (handler)
Cocos2dx C ++ schedule:
Scheduleupdate ()-> Update (float DT)
Schedule (schedule_selector (handler), time)
Scheduler timer of quick cocos