summary refs log tree commit diff stats
path: root/src/system_manager.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/system_manager.h')
-rw-r--r--src/system_manager.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/system_manager.h b/src/system_manager.h index e2c98cb..b03c3f2 100644 --- a/src/system_manager.h +++ b/src/system_manager.h
@@ -39,6 +39,30 @@ public:
39 return *dynamic_cast<T*>(systems[systemType]); 39 return *dynamic_cast<T*>(systems[systemType]);
40 } 40 }
41 41
42 void tick(double dt)
43 {
44 for (std::unique_ptr<System>& sys : loop)
45 {
46 sys->tick(dt);
47 }
48 }
49
50 virtual void render(Texture& texture)
51 {
52 for (std::unique_ptr<System>& sys : loop)
53 {
54 sys->render(texture);
55 }
56 }
57
58 virtual void input(int key, int action)
59 {
60 for (std::unique_ptr<System>& sys : loop)
61 {
62 sys->input(key, action);
63 }
64 }
65
42}; 66};
43 67
44#endif /* end of include guard: SYSTEM_MANAGER_H_544E6056 */ 68#endif /* end of include guard: SYSTEM_MANAGER_H_544E6056 */