How to create android cocos2dx splash screen?

前端 未结 4 816
余生分开走
余生分开走 2021-01-15 17:27

This is my code I don\'t know how to create splash screen and how it will direct in my menu screen. All .h must be connected to BaseScreen and the BaseScreen will be the one

4条回答
  •  感动是毒
    2021-01-15 18:00

    You can make class inherit from CCLayer which start your applications and display your sprite. Then you can override onEnterTransitionDidFinish method:

     void SplashScreen::onEnterTransitionDidFinish(){
      CCScene * sceneAfterSplashScreen = StartLayer::scene();
      CCDirector::sharedDirector()->replaceScene(sceneAfterSplashScreen);
    }
    

    When the splash screen arrived to the screen, then it's start to load new scene and replace it.

提交回复
热议问题