mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-24 22:47:25 +00:00
23 lines
431 B
C++
23 lines
431 B
C++
|
#include "EntityCallbackTimer.h"
|
||
|
|
||
|
EntityCallbackTimer::EntityCallbackTimer(float time, std::function<void()> callback) {
|
||
|
m_Time = time;
|
||
|
m_Callback = callback;
|
||
|
}
|
||
|
|
||
|
EntityCallbackTimer::~EntityCallbackTimer() {
|
||
|
|
||
|
}
|
||
|
|
||
|
std::function<void()> EntityCallbackTimer::GetCallback() {
|
||
|
return m_Callback;
|
||
|
}
|
||
|
|
||
|
float EntityCallbackTimer::GetTime() {
|
||
|
return m_Time;
|
||
|
}
|
||
|
|
||
|
void EntityCallbackTimer::Update(float deltaTime) {
|
||
|
m_Time -= deltaTime;
|
||
|
}
|