X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgame%2Fstage.h;h=80e7a4b72c25e51141d43718c6bed196ffdf712c;hb=f93a0f0afe8aff4d0bbc8ee393918881cfdd9db8;hp=dbffc9960bedb4fd89c55a232dd6dd91f0fb68c5;hpb=6a93721ab67315e916f6c649b1f7bc5447d611a4;p=libs%2Fgame.git diff --git a/source/game/stage.h b/source/game/stage.h index dbffc99..80e7a4b 100644 --- a/source/game/stage.h +++ b/source/game/stage.h @@ -4,6 +4,8 @@ #include #include #include "eventbus.h" +#include "events.h" +#include "eventsource.h" #include "handle.h" namespace Msp::Game { @@ -13,9 +15,14 @@ class System; class Stage { +public: + using EventSource = Game::EventSource; + private: PoolPool pools; EventBus event_bus; + EventSource event_source; /* Use unique_ptr because there's only one root per stage so it's pointless to put it in a pool. */ std::unique_ptr root; @@ -27,6 +34,7 @@ public: PoolPool &get_pools() { return pools; } EventBus &get_event_bus() { return event_bus; } + EventSource &get_event_source() { return event_source; } Handle get_root() { return Handle::from_object(root.get()); } template