Input
This commit is contained in:
1 parent
a896b772fb
commit
90c3b6149e
16 files changed
+469
-74
No files matched your search
+4
-11
@@ -7,21 +7,13 @@
|
||||
|
||||
using namespace Dawn;
|
||||
|
||||
std::shared_ptr<Engine> Engine::instance = nullptr;
|
||||
|
||||
std::shared_ptr<Engine> Engine::getInstance() {
|
||||
if(!Engine::instance) {
|
||||
Engine::instance = std::make_shared<Engine>();
|
||||
}
|
||||
return Engine::instance;
|
||||
}
|
||||
|
||||
Engine::Engine() :
|
||||
time(),
|
||||
console(),
|
||||
display()
|
||||
display(*this),
|
||||
input(*this)
|
||||
{
|
||||
console.registerCommand("exit", [this](std::vector<std::string> &args) {
|
||||
console.registerCommand("exit", [this](auto console, auto args) {
|
||||
this->exitRequested = true;
|
||||
});
|
||||
}
|
||||
@@ -32,6 +24,7 @@ bool_t Engine::isExitRequested() const {
|
||||
|
||||
void Engine::update(void) {
|
||||
time.update();
|
||||
input.update();
|
||||
console.update();
|
||||
display.update();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user