I call scheduleOnce in my onEnter function. But it doesn’t work.
Here is my code:
void IntroScene::onEnter()
{
this->scheduleOnce(schedule_selector(IntroScene::makeTransition), 1.0f);
}
void IntroScene::makeTransition(cocos2d::CCTime delta)
{
printf(“makeTransition”);
}
The onEnter is called without any problem. But makeTransition is never been called. How can I debug this problem? Thanks
Not sure if it would make a difference but my schedule_selector function takes a float as the param.
I wonder if its not calling it as you specified CCTime?
Adam Reed wrote:
Not sure if it would make a difference but my schedule_selector function takes a float as the param.
I wonder if its not calling it as you specified CCTime?
I tried float too. But it doesn’t work either.
I found the problem.
Here is the code:
void IntroScene::onEnter()
{
CCLayer::onEnter(); // must call this
this->scheduleOnce(schedule_selector(IntroScene::makeTransition), 1.0f);
}