DarkflameServer/dGame/dEntity/EntityCallbackTimer.cpp

27 lines
508 B
C++
Raw Normal View History

#include "EntityCallbackTimer.h"
EntityCallbackTimer::EntityCallbackTimer(const float& time, const std::function<void()>& callback) {
m_Time = time;
m_Callback = callback;
}
EntityCallbackTimer::~EntityCallbackTimer() {
2022-07-28 13:39:57 +00:00
}
2023-06-15 02:01:31 +00:00
void EntityCallbackTimer::ExecuteCallback() {
m_Callback();
}
std::function<void()> EntityCallbackTimer::GetCallback() {
return m_Callback;
}
float EntityCallbackTimer::GetTime() {
return m_Time;
}
void EntityCallbackTimer::Update(float deltaTime) {
m_Time -= deltaTime;
}