X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgame%2Fstage.h;h=80e7a4b72c25e51141d43718c6bed196ffdf712c;hb=f93a0f0afe8aff4d0bbc8ee393918881cfdd9db8;hp=47ca47d9a572b6c5742e5a5279877d5af983584c;hpb=c7d0e1aff305778f97974b329826628966380158;p=libs%2Fgame.git diff --git a/source/game/stage.h b/source/game/stage.h index 47ca47d..80e7a4b 100644 --- a/source/game/stage.h +++ b/source/game/stage.h @@ -3,6 +3,9 @@ #include #include +#include "eventbus.h" +#include "events.h" +#include "eventsource.h" #include "handle.h" namespace Msp::Game { @@ -12,8 +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; @@ -24,6 +33,8 @@ public: ~Stage(); 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