bool LoadingScene::init(){
    if (!LayerColor::init()) {
        return false;
    }
    Size size = Director::getInstance()->getVisibleSize();
    Sprite* bg = Sprite::create("loading/bg.jpg");
    bg->setPosition(Point(size.width/2, size.height/2));
    this->addChild(bg);
    
    this->runAction(Sequence::create(DelayTime::create(3),
                                     CallFunc::create([=]()
                                                      {
                                                          STSystemFunction st;
                                                          st.showNewsBlast();
                                                          SceneManager::replaceTheScene<HomeScene>();
                                                      }),
                                     NULL));
    
    return true;
}
Пример #2
0
void LoadingScene::switchScene(float) {
    STSystemFunction st;
    st.showNewsBlast();
    replaceTheScene<HomeScene>();
}