cocos2dx教程之CCLayer schedule

scheduleUpdate();

schedule(schedule_selector(SchedulerUpdateAndCustom::tick));

schedule(schedule_selector(SchedulerUpdateAndCustom::stopSelectors), 0.4f);

void SchedulerUpdateAndCustom::update(float dt)

{   CCLOG("update called:%f", dt);}

void SchedulerUpdateAndCustom::tick(float dt)

{   CCLOG("custom selector called:%f",dt);

}

void SchedulerUpdateAndCustom::stopSelectors(float dt)

{   unscheduleAllSelectors();

}

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章