]> git.tdb.fi Git - libs/game.git/blob - source/game/stage.cpp
Add resource container references to Director and Stage
[libs/game.git] / source / game / stage.cpp
1 #include "stage.h"
2 #include "root.h"
3 #include "system.h"
4
5 namespace Msp::Game {
6
7 Stage::Stage(DataFile::Collection &r):
8         resources(r),
9         event_source(event_bus),
10         root(std::make_unique<Root>(*this))
11 { }
12
13 // Hide unique_ptr destructors from the header
14 Stage::~Stage()
15 { }
16
17 void Stage::tick(Time::TimeDelta dt)
18 {
19         for(const auto &s: systems)
20                 s->tick(dt);
21 }
22
23 } // namespace Msp::Game