Display
This commit is contained in:
1 parent
96fcddea30
commit
1d16c0ae68
12 files changed
+256
-39
No files matched your search
+18
-10
@@ -7,25 +7,33 @@
|
||||
|
||||
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()
|
||||
console(),
|
||||
display()
|
||||
{
|
||||
// console.registerCommand("echo", [](std::vector<std::string> &args) {
|
||||
// if(args.size() == 0) {
|
||||
// std::cout << "Usage: echo <message>" << std::endl;
|
||||
// return;
|
||||
// }
|
||||
console.registerCommand("exit", [this](std::vector<std::string> &args) {
|
||||
this->exitRequested = true;
|
||||
});
|
||||
}
|
||||
|
||||
// std::cout << args[0] << std::endl;
|
||||
// });
|
||||
|
||||
// console.exec("echo");
|
||||
bool_t Engine::isExitRequested() const {
|
||||
return this->exitRequested;
|
||||
}
|
||||
|
||||
void Engine::update(void) {
|
||||
time.update();
|
||||
console.update();
|
||||
display.update();
|
||||
}
|
||||
|
||||
Engine::~Engine() {
|
||||
|
||||
Reference in new issue
Block a user