bool HelloWorld::init()
{
if ( !Layer::init() )
{
return false;
}
Size visibleSize = Director::getInstance()->getVisibleSize();
Vec2 origin = Director::getInstance()->getVisibleOrigin();
auto background=Sprite::create("Saloon (5).png");
background->setPosition(visibleSize/2);
background->setScale(10);
addChild(background);
scheduleOnce([visibleSize](float f){
//创建新的场景
auto newScene=Scene::create();
auto newBackground=Sprite::create("Saloon (7).png");
newBackground->setPosition(visibleSize/2);
newBackground->setScale(10);
newScene->addChild(newBackground);
//auto transition=TransitionCrossFade::create(1,newScene);
//auto transition=TransitionZoomFlipAngular::create(1,newScene);
//auto transition=TransitionPageTurn::create(1,newScene,true);
//auto transition=TransitionProgressRadialCCW::create(1,newScene);
auto transition=TransitionSplitRows::create(1,newScene);
Director::getInstance()->replaceScene(transition);
},2,"Test");
return true;
}