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
돌아가면서 호출된다.
'Cocos2d' 카테고리의 다른 글
cocos2d-x HelloWorld 실행시 오류 (1) | 2012.08.24 |
---|---|
cocos2d-x sharedDispatcher()대신 sharedDirector()->getTouchDispatcher() (0) | 2012.08.21 |
cocos2d-x Schedule에 대해 (0) | 2012.08.14 |
cocos2d-x에서 한글 출력하는 방법 (0) | 2012.08.14 |
particle 및 label 객체 관리 (0) | 2012.07.24 |