]> git.tdb.fi Git - libs/game.git/commitdiff
Add some useful accessors
authorMikko Rasa <tdb@tdb.fi>
Sat, 29 Oct 2022 17:46:04 +0000 (20:46 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 29 Oct 2022 18:15:46 +0000 (21:15 +0300)
source/game/director.h
source/game/system.h

index 9d221b0678345a8def4c06b5936c3bee95ebe865..5f33aef0a0dcbe48fe744832a17fe54556a3ad84 100644 (file)
@@ -31,8 +31,14 @@ private:
 
 public:
        Director();
+
+       EventBus &get_event_bus() { return event_bus; }
+       EventSource &get_event_source() { return event_source; }
+       const std::vector<std::unique_ptr<Stage>> &get_stages() const { return stages; }
+
        Stage &create_stage();
        void activate_stage(Stage &);
+       Stage *get_active_stage() const { return active_stage; }
 
        void tick();
 };
index 2d73928ee7c177c2ccccfec51823a3adc975a58d..9e6ec2a6e923e7ca6befd3f66ae0c67aa0119099 100644 (file)
@@ -16,6 +16,8 @@ protected:
 public:
        virtual ~System() = default;
 
+       Stage &get_stage() const { return stage; }
+
        virtual void tick(Time::TimeDelta) = 0;
 };