直接贴代码
SEL_SCHEDULE shiftLand = schedule_selector(GameLayer::scrollLand); this->schedule(shiftLand, 0.02f);//设置频率,每隔0.2s触发一次 this->scheduleUpdate();
void GameLayer::scrollLand(float dt) { }
this->unschedule(shiftLand);
cocos2dx-3.2 笔记 - schedule(类似定时器),布布扣,bubuko.com
cocos2dx-3.2 笔记 - schedule(类似定时器)
原文:http://www.cnblogs.com/kee-chen/p/3928866.html