feat: changed timer mecanic and mage tower

This commit is contained in:
2021-10-11 19:09:56 +02:00
parent a6ccdcc7af
commit a62549e93e
3 changed files with 34 additions and 3 deletions

View File

@@ -40,14 +40,17 @@ public:
class Timer {
private:
std::uint64_t m_Interval;
std::uint64_t m_InternalTime = 0;
bool m_Waiting = true;
public:
Timer() : m_Interval(0) {}
Timer(std::uint64_t interval) : m_Interval(interval) {}
bool update(std::uint64_t delta);
void wait(); // let update return true on the next tick (if it was not used)
void reset();
void setInterval(std::uint64_t newInterval) { m_Interval = newInterval; }