]> git.tdb.fi Git - libs/game.git/blobdiff - source/game/stage.h
Minor optimization to AccessGuard::check
[libs/game.git] / source / game / stage.h
index 19e70f416f54b512087f4560c5c06c9527f185c8..283dc81c0747776875cfed9d0048aa720b1bfbba 100644 (file)
@@ -8,6 +8,7 @@
 #include "events.h"
 #include "eventsource.h"
 #include "handle.h"
+#include "reflection.h"
 
 namespace Msp::Game {
 
@@ -22,6 +23,7 @@ public:
                Events::ComponentCreated, Events::ComponentDestroyed, Events::CameraChanged>;
 
 private:
+       Reflection::Reflector &reflector;
        DataFile::Collection &resources;
        PoolPool pools;
        EventBus event_bus;
@@ -34,9 +36,10 @@ private:
        Handle<Camera> active_camera;
 
 public:
-       Stage(DataFile::Collection &);
+       Stage(Reflection::Reflector &, DataFile::Collection &);
        ~Stage();
 
+       Reflection::Reflector &get_reflector() const { return reflector; }
        DataFile::Collection &get_resources() const { return resources; }
        PoolPool &get_pools() { return pools; }
        EventBus &get_event_bus() { return event_bus; }
@@ -58,6 +61,11 @@ public:
        void set_active_camera(Handle<Camera>);
        Handle<Camera> get_active_camera() const { return active_camera; }
 
+       void synthesize_initial_events(EventObserver &);
+private:
+       void synthesize_initial_events(Handle<Entity>, EventObserver &);
+
+public:
        void tick(Time::TimeDelta);
 };