示例#1
0
LoadingState::LoadingState(ah::StateManager& manager)
: ah::State(manager)
, mThread(std::bind(&World::init))
{
    mType = LoadingState::getID();

    mBackground.setSize(sf::Vector2f(800,600));
    mBackground.setFillColor(sf::Color(110,40,240));

    mText.setCharacterSize(40);
    mText.setString("Loading");
    mText.setFont(ah::Application::instance().getFont("future"));
    mText.setColor(sf::Color::White);
    mText.setPosition(400.f - mText.getGlobalBounds().width * 0.5f, 300.f - mText.getGlobalBounds().height * 0.5f - 25.f);

    mTimer.setPosition(400.f-150.f,300.f+50.f+25.f);
    mTimer.setSize(sf::Vector2f(300.f,50.f));
    mTimer.setFillColor(sf::Color(40,195,230));
    mTimer.getShapeTop().setFillColor(sf::Color(40,90,240));
    mTimer.setCallback([&]()
    {
        mThread.wait();
        requestPop();
        requestPush(GameState::getID());
    });
    mTimer.restart(sf::seconds(2.f));

    mThread.launch();
}
void LogoState::exitUpdate(sf::Time df)
{
	//exit_effect.update(df);
	//if (!exit_effect.isRunning())
	//{
		requestPush(StateName::StartMenu);
		setTransitionState(Transitions::OnEnter);
		std::cout << "Logo to onEnter StartMenu" << std::endl;
	//}
	
}
void QPushbulletHandler::requestPushToAllDevices(Push &push)
{
    requestPush(push, "", "");
}
void QPushbulletHandler::requestPushToContact(Push &push, QString email)
{
    requestPush(push, "", email);
}
void QPushbulletHandler::requestPushToDevice(Push &push, QString deviceID)
{
    requestPush(push, deviceID, "");
}