X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgame%2Fstage.cpp;h=8d781f28961fc77da688b640c9c579a44c9b4a28;hb=33aed7ee82844023346f8cb9c3108cb0d6c80369;hp=a6bd19a9b5b6134e76e9e4fa70099ceaad6f2b67;hpb=248d62f7240d342982ade65a510be912b867fe49;p=libs%2Fgame.git diff --git a/source/game/stage.cpp b/source/game/stage.cpp index a6bd19a..8d781f2 100644 --- a/source/game/stage.cpp +++ b/source/game/stage.cpp @@ -1,24 +1,22 @@ #include "stage.h" +#include "root.h" #include "system.h" namespace Msp::Game { Stage::Stage(): - root(*this) + event_source(event_bus), + root(std::make_unique(*this)) { } -// Hide ~unique_ptr from the header +// Hide unique_ptr destructors from the header Stage::~Stage() { } void Stage::tick(Time::TimeDelta dt) { - for(const auto &s: systems) - s->pre_tick(); for(const auto &s: systems) s->tick(dt); - for(const auto &s: systems) - s->post_tick(); } } // namespace Msp::Game