DarkflameServer/dGame/dEntity/EntityCallbackTimer.h
2023-06-14 23:16:31 -07:00

21 lines
373 B
C++

#pragma once
#include <string>
#include <functional>
class EntityCallbackTimer {
public:
EntityCallbackTimer(const float& time, const std::function<void()>& callback);
~EntityCallbackTimer();
void ExecuteCallback();
std::function<void()> GetCallback();
float GetTime();
void Update(float deltaTime);
private:
std::function<void()> m_Callback;
float m_Time;
};