Check in... animations are roughly half built

This commit is contained in:
John McCardle 2023-03-06 20:54:23 -05:00
commit d74635ee4e
8 changed files with 167 additions and 52 deletions

View file

@ -27,6 +27,8 @@ GameEngine::GameEngine()
scenes["py"] = new PythonScene(this, "TestScene");
IndexSprite::game = this;
clock.restart();
}
Scene* GameEngine::currentScene() { return scenes[scene]; }
@ -38,6 +40,7 @@ sf::RenderWindow & GameEngine::getWindow() { return window; }
void GameEngine::run()
{
clock.restart();
while (running)
{
currentScene()->update();
@ -47,6 +50,7 @@ void GameEngine::run()
}
currentScene()->sRender();
currentFrame++;
frameTime = clock.restart().asSeconds();
}
}