]> git.tdb.fi Git - libs/game.git/blobdiff - source/game/stage.h
Add a function to remove a system from a stage
[libs/game.git] / source / game / stage.h
index d7793e22f60ec21fd52acab1b8af9aafbe2f4d94..d2d05dd986a1c2f21a1f9f59f9a1116d7b330448 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_GAME_STAGE_H_
 
 #include <memory>
+#include <msp/datafile/collection.h>
 #include <msp/time/timedelta.h>
 #include "eventbus.h"
 #include "events.h"
@@ -20,6 +21,7 @@ public:
                Events::ComponentCreated, Events::ComponentDestroyed>;
 
 private:
+       DataFile::Collection &resources;
        PoolPool pools;
        EventBus event_bus;
        EventSource event_source;
@@ -29,9 +31,10 @@ private:
        std::vector<std::unique_ptr<System>> systems;
 
 public:
-       Stage();
+       Stage(DataFile::Collection &);
        ~Stage();
 
+       DataFile::Collection &get_resources() const { return resources; }
        PoolPool &get_pools() { return pools; }
        EventBus &get_event_bus() { return event_bus; }
        EventSource &get_event_source() { return event_source; }
@@ -43,6 +46,7 @@ public:
        template<typename T, typename... Args>
        T &add_system(Args &&...);
 
+       void remove_system(System &);
        const std::vector<std::unique_ptr<System>> &get_systems() const { return systems; }
 
        template<typename T>