]> git.localhorst.tv Git - blank.git/blob - src/app/State.hpp
group entity updates in as few packets as possible
[blank.git] / src / app / State.hpp
1 #ifndef BLANK_APP_STATE_HPP_
2 #define BLANK_APP_STATE_HPP_
3
4 #include <SDL.h>
5
6
7 namespace blank {
8
9 class HeadlessApplication;
10 class Viewport;
11
12 struct State {
13
14         friend class HeadlessApplication;
15
16         virtual void Handle(const SDL_Event &) = 0;
17
18         virtual void Update(int dt) = 0;
19
20         virtual void Render(Viewport &) = 0;
21
22
23 private:
24         int ref_count = 0;
25
26         virtual void OnEnter() { }
27         virtual void OnResume() { }
28         virtual void OnPause() { }
29         virtual void OnExit() { }
30
31 };
32
33 };
34
35 #endif