Save Manager
This commit is contained in:
50
src/dawn/time/ITimeManager.hpp
Normal file
50
src/dawn/time/ITimeManager.hpp
Normal file
@ -0,0 +1,50 @@
|
||||
// Copyright (c) 2022 Dominic Masters
|
||||
//
|
||||
// This software is released under the MIT License.
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#pragma once
|
||||
#include "dawnlibs.hpp"
|
||||
#include "event/Event.hpp"
|
||||
|
||||
namespace Dawn {
|
||||
class ITimeManager {
|
||||
public:
|
||||
float_t time = 0.0f;
|
||||
float_t unpausedTime = 0.0f;
|
||||
float_t delta = 0.016f;
|
||||
bool_t isPaused = false;
|
||||
|
||||
Event<> eventTimePaused;
|
||||
Event<> eventTimeResumed;
|
||||
|
||||
/**
|
||||
* Constructor for the Time Manager.
|
||||
*/
|
||||
ITimeManager();
|
||||
|
||||
/**
|
||||
* Updates / Ticks the time manager instance.
|
||||
*
|
||||
* @param delta Time in seconds to tick the instance by.
|
||||
*/
|
||||
void update(float_t delta);
|
||||
|
||||
/**
|
||||
* Pauses the game.
|
||||
*/
|
||||
void pause();
|
||||
|
||||
/**
|
||||
* Resumes the game.
|
||||
*/
|
||||
void resume();
|
||||
|
||||
/**
|
||||
* Returns the current system timestamp.
|
||||
*
|
||||
* @return Current timestamp.
|
||||
*/
|
||||
virtual int64_t getTimestamp() = 0;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user