Hello all,
I’m a newbie. At this time, I want to change scene after a few seconds (about 3-5 seconds). But I don’t know how to do. I know schedule but I don’t want it loops. I mean it just works only once.
Thanks!
Hello all,
I’m a newbie. At this time, I want to change scene after a few seconds (about 3-5 seconds). But I don’t know how to do. I know schedule but I don’t want it loops. I mean it just works only once.
Thanks!
ScheduleOnce or runAction(CCSequnce(CCDelay(float dt),CCCallFunc(GameOverScene))
Thank for your reply, but what can I assigne for dt, I mean I’ll assign it 3.0 if I want to delay 3 seconds ???
loly yoshi wrote:
Thank for your reply, but what can I assigne for dt, I mean I’ll assign it 3.0 if I want to delay 3 seconds ???
For example in you splash screen for a 1s delay:
//in the init():
this->schedule(schedule_selector(CSplashLayer::RunMainMenu), 1.0f);
void CSplashLayer::RunMainMenu(float dt) {
// run main menu
}
Great! That’s what I need. Thank for your help
Richard Allbert wrote:
loly yoshi wrote:
Thank for your reply, but what can I assigne for dt, I mean I’ll assign it 3.0 if I want to delay 3 seconds ???
For example in you splash screen for a 1s delay:
//in the init(): this->schedule(schedule_selector(CSplashLayer::RunMainMenu), 1.0f); void CSplashLayer::RunMainMenu(float dt) { // run main menu }