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();

}

你可能感兴趣的:(cocos2d-x,CCLayerColor)