1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#include "game.hpp" #include <chrono> #include <thread> Game::Game(const std::shared_ptr<IScene> &scene) : _scene(scene) {} void Game::run() { _scene->enter(); std::this_thread::sleep_for(std::chrono::seconds(3)); _scene->leave(); }