2012. 8. 16. 10:40

void MyScene::scheduleCountOne(float dt)

{

this->unschedule(schedule_selector( MyScene ::scheduleCountThree));

this->schedule(schedule_selector( MyScene ::scheduleCountTwo), 0.0f, 0, 1.0f);

CCLog("One");

}

void  MyScene ::scheduleCountTwo(float dt)

{

this->unschedule(schedule_selector( MyScene ::scheduleCountOne));

this->schedule(schedule_selector( MyScene ::scheduleCountThree), 0.0f, 0, 1.0f);

CCLog("Two");

}

void  MyScene ::scheduleCountThree(float dt)

{

this->unschedule(schedule_selector( MyScene ::scheduleCountTwo));

this->schedule(schedule_selector( MyScene ::scheduleCountOne), 0.0f, 0, 1.0f);

CCLog("Three");

}


1초마다 scheduleCountOne->scheduleCountTwo->scheduleCountThree->scheduleCountOne

돌아가면서 호출된다.

Posted by Нуеоп