Exemplo n.º 1
0
float STVisibleRect::getBannerHeight(){
    float bannerSize = 0;
    STSystemFunction st;
    bool istablet = st.isTabletAvailable();
    if (istablet == false) {
        bannerSize = 50;
    }else {
        bannerSize = 90;
    }
    return bannerSize;
}
Exemplo n.º 2
0
Rect STVisibleRect::getMovableRect(){
    float bannerSize = 0;
    STSystemFunction st;
    bool istablet = st.isTabletAvailable();
    if (istablet == true) {
        bannerSize = 50;
    }else {
        bannerSize = 90;
    }
    return Rect(Director::getInstance()->getVisibleOrigin().x, Director::getInstance()->getVisibleOrigin().y+bannerSize, Director::getInstance()->getVisibleSize().width, Director::getInstance()->getVisibleSize().height-bannerSize);
//    }
    
}
Exemplo n.º 3
0
std::string STFileUtility::getStoragePath()
{
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
	return CCFileUtils::sharedFileUtils()->getWritablePath();
#endif
#if(CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
	STSystemFunction* sys = new STSystemFunction();
	std::string path = sys->getSdCardPath();
	delete sys;
	return path;
#endif
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
	return CCFileUtils::sharedFileUtils()->getWritablePath();
#endif
}
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;
}
Exemplo n.º 5
0
void LoadingScene::switchScene(float) {
    STSystemFunction st;
    st.showNewsBlast();
    replaceTheScene<HomeScene>();
}