Voxellancer  0.3
A game about voxels in space
 All Classes Functions Pages
timer.h
1 #pragma once
2 
3 #include <functional>
4 
5 #include "eventpoll.h"
6 
7 
8 class Timer: public EventPoll {
9 public:
10  Timer(float interval, const std::function<void()>& callback);
11 
12  virtual void update(float deltaSec) override;
13 
14 
15 protected:
16  float m_interval;
17  float m_countdown;
18  int m_scheduledCalls;
19 
20  virtual bool poll() override;
21  virtual void specialOnCallback() override;
22 };
23 
Definition: timer.h:8
Definition: eventpoll.h:11