예제 #1
0
void KrecikApp::init()
{
    win.draw(Text(L"Loading...", r.f, 30));
    win.display();

    loadTextures();
    createCar();
    createLevel();

    Sprite loadwheel(whTex);
    loadwheel.setPosition(20.0f, 20.0f);
    //loadwheel.setScale(2.0f, 2.0f);
    loadwheel.setOrigin(getCenter(loadwheel.getGlobalBounds()));
    Clock tmp;

    while(!Keyboard::isKeyPressed(Keyboard::Return))
    {
        Time elapsed = tmp.restart();
        win.clear();
        win.draw(Text("    Press <Enter> to start...",r.f, 30));
        loadwheel.rotate(elapsed.asSeconds() * 400.0f);
        win.draw(loadwheel);
        win.display();
    }
}
// Increment the number of cars produced and return the new car.
std::unique_ptr<Car> CarFactory::requestCar()
{
	++mNumberOfCarsProduced;
	return createCar();
}