]> git.tdb.fi Git - libs/game.git/blobdiff - source/game/director.h
Add resource container references to Director and Stage
[libs/game.git] / source / game / director.h
index 9d221b0678345a8def4c06b5936c3bee95ebe865..05be9f7172c653bd04a9a01f72920a42e123b665 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <memory>
 #include <vector>
+#include <msp/datafile/collection.h>
 #include <msp/time/timedelta.h>
 #include <msp/time/timestamp.h>
 #include "eventbus.h"
@@ -19,6 +20,7 @@ public:
        using EventSource = Game::EventSource<Events::StageCreated, Events::StageActivated, Events::StageDeactivated>;
 
 private:
+       DataFile::Collection &resources;
        EventBus event_bus;
        EventSource event_source;
        std::vector<std::unique_ptr<Stage>> stages;
@@ -30,9 +32,16 @@ private:
        unsigned max_backlog_steps = 600;
 
 public:
-       Director();
+       Director(DataFile::Collection &);
+
+       DataFile::Collection &get_resources() const { return resources; }
+       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();
 };