Dawn/src/dawnpokergame/game/DawnGame.cpp
2023-01-06 21:01:06 -08:00

41 lines
901 B
C++

// Copyright (c) 2022 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#include "DawnGame.hpp"
#include "scenes/Scene_1_1.hpp"
#include "scenes/TestScene.hpp"
using namespace Dawn;
DawnGame::DawnGame(DawnHost *host) :
host(host),
renderManager(this),
inputManager(this),
localeManager(this),
saveManager(this)
{
}
int32_t DawnGame::init() {
this->assetManager.init();
this->localeManager.init();
this->renderManager.init();
this->scene = new TestScene(this);
return DAWN_GAME_INIT_RESULT_SUCCESS;
}
int32_t DawnGame::update(float_t delta) {
this->assetManager.update();
this->inputManager.update();
this->timeManager.update(delta);
if(this->scene != nullptr) this->scene->update();
this->renderManager.update();
return DAWN_GAME_UPDATE_RESULT_SUCCESS;
}