4
\$\begingroup\$

I am using Cocos2D for Android: I have two scenes MainScene and LogoScene. I want to show a Splash screen on LogoScene then, I want to go to MainScene.

I am wondering how I can go from LogoScene to MainScene using:

CCDirector.sharedDirector().replaceScene(MainScene.scene());

What is an example of Scene Transition from a splash screen to the main scene?

\$\endgroup\$
2
  • \$\begingroup\$ So... you just want the same replacement except with a transition? \$\endgroup\$
    – Ali1S232
    Jul 3, 2016 at 5:00
  • \$\begingroup\$ Well I want to have a splash screen then, change to MainScene. \$\endgroup\$
    – sn0wfall
    Jul 3, 2016 at 14:53

1 Answer 1

0
\$\begingroup\$

The splash screen can just be another scene and you can transition between them using scene transition effects. Just change the code to match this

Director::getInstance()->replaceScene(TransitionFade::create(0.5, mainMenuScreen, Color3B(0,255,255)));

This creates a fade effect between your screens. Hope it gives you the desired effect.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .