auto scene = Scene::create(); auto layer = LayerColor::create(Color4B(255, 255, 255, 255)); scene->addChild(layer);
auto newScene = Scene::create(); auto transition = TransitionFade::create(1.0, newScene, Color3B(0, 255, 255)); Director::getInstance()->replaceScene(transition);In this example, we create a new CCScene and a TransitionFade animation to smoothly switch to it. We then use Director::getInstance()->replaceScene() to display the new scene. Package Library: Cocos2d-x game development framework.