Save Manager

This commit is contained in:
2022-12-17 23:18:06 -08:00
parent 813328c197
commit 1e7dcb815e
23 changed files with 574 additions and 15 deletions

View File

@ -0,0 +1,32 @@
// Copyright (c) 2022 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#include "ITimeManager.hpp"
using namespace Dawn;
ITimeManager::ITimeManager() {
}
void ITimeManager::update(float_t delta) {
this->delta = delta;
this->time += delta;
if(!this->isPaused) {
this->unpausedTime += delta;
}
}
void ITimeManager::pause() {
if(this->isPaused) return;
this->isPaused = true;
this->eventTimePaused.invoke();
}
void ITimeManager::resume() {
if(!this->isPaused) return;
this->isPaused = false;
this->eventTimeResumed.invoke();
}