]> git.tdb.fi Git - libs/game.git/blob - source/game/stage.cpp
a6bd19a9b5b6134e76e9e4fa70099ceaad6f2b67
[libs/game.git] / source / game / stage.cpp
1 #include "stage.h"
2 #include "system.h"
3
4 namespace Msp::Game {
5
6 Stage::Stage():
7         root(*this)
8 { }
9
10 // Hide ~unique_ptr<System> from the header
11 Stage::~Stage()
12 { }
13
14 void Stage::tick(Time::TimeDelta dt)
15 {
16         for(const auto &s: systems)
17                 s->pre_tick();
18         for(const auto &s: systems)
19                 s->tick(dt);
20         for(const auto &s: systems)
21                 s->post_tick();
22 }
23
24 } // namespace Msp::Game