From: Mikko Rasa Date: Sat, 29 Oct 2022 17:46:04 +0000 (+0300) Subject: Add some useful accessors X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=aec84d90bbbbd7dce66cc90ed545322802b959f6;p=libs%2Fgame.git Add some useful accessors --- diff --git a/source/game/director.h b/source/game/director.h index 9d221b0..5f33aef 100644 --- a/source/game/director.h +++ b/source/game/director.h @@ -31,8 +31,14 @@ private: public: Director(); + + EventBus &get_event_bus() { return event_bus; } + EventSource &get_event_source() { return event_source; } + const std::vector> &get_stages() const { return stages; } + Stage &create_stage(); void activate_stage(Stage &); + Stage *get_active_stage() const { return active_stage; } void tick(); }; diff --git a/source/game/system.h b/source/game/system.h index 2d73928..9e6ec2a 100644 --- a/source/game/system.h +++ b/source/game/system.h @@ -16,6 +16,8 @@ protected: public: virtual ~System() = default; + Stage &get_stage() const { return stage; } + virtual void tick(Time::TimeDelta) = 0; };