Testing some event stuff
This commit is contained in:
@ -22,14 +22,15 @@ void Game::init() {
|
||||
}
|
||||
|
||||
void Game::update() {
|
||||
timeManager.update();
|
||||
renderHost.update(shared_from_this());
|
||||
|
||||
if(nextFrameScene) {
|
||||
nextFrameScene->stage();
|
||||
currentScene = nextFrameScene;
|
||||
nextFrameScene = nullptr;
|
||||
}
|
||||
|
||||
timeManager.update();
|
||||
if(currentScene) currentScene->update();
|
||||
renderHost.update(shared_from_this());
|
||||
}
|
||||
|
||||
bool_t Game::isCloseRequested() {
|
||||
|
@ -14,8 +14,8 @@ namespace Dawn {
|
||||
|
||||
class Game : public std::enable_shared_from_this<Game> {
|
||||
private:
|
||||
std::shared_ptr<Scene> currentScene;
|
||||
std::shared_ptr<Scene> nextFrameScene;
|
||||
std::shared_ptr<Scene> currentScene = nullptr;
|
||||
std::shared_ptr<Scene> nextFrameScene = nullptr;
|
||||
|
||||
public:
|
||||
RenderHost renderHost;
|
||||
|
Reference in New Issue
Block a user