X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgame%2Fdirector.h;h=9d221b0678345a8def4c06b5936c3bee95ebe865;hb=f90804b7a1042a1266cbe3075631e4fcc18b9a8a;hp=24ef6341caaf7e93e784ccc7bde1176621ef7e55;hpb=c809f54b802727926bae40e9fe67d0e3c94fd2c0;p=libs%2Fgame.git diff --git a/source/game/director.h b/source/game/director.h index 24ef634..9d221b0 100644 --- a/source/game/director.h +++ b/source/game/director.h @@ -5,6 +5,9 @@ #include #include #include +#include "eventbus.h" +#include "events.h" +#include "eventsource.h" namespace Msp::Game { @@ -12,8 +15,14 @@ class Stage; class Director { +public: + using EventSource = Game::EventSource; + private: + EventBus event_bus; + EventSource event_source; std::vector> stages; + Stage *active_stage = nullptr; Time::TimeStamp last_tick; Time::TimeDelta stepsize = Time::sec/60; Time::TimeDelta backlog; @@ -21,7 +30,9 @@ private: unsigned max_backlog_steps = 600; public: + Director(); Stage &create_stage(); + void activate_stage(Stage &); void tick(); };