From f338b4d15b57770d922e187b7a57d25fbf379b62 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Mon, 30 Apr 2018 23:00:50 +0100 Subject: Adding support for entity component systems. --- yage/entity/engine.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'yage/entity/engine.h') diff --git a/yage/entity/engine.h b/yage/entity/engine.h index 6e1bf49a..fe7e5eb0 100644 --- a/yage/entity/engine.h +++ b/yage/entity/engine.h @@ -9,16 +9,21 @@ #ifndef YAGE_CORE_ENGINE_H #define YAGE_CORE_ENGINE_H -#include "../core/window.h" #include "system.h" +#include "../core/window.h" +#include #include namespace yage { -/// Main engine class that contains a systems, the main loop and the update -/// function that updates all the systems. +class Space; + +/** + * Main engine class that contains a systems, the main loop and the update + * function that updates all the systems. + */ class Engine { public: @@ -31,6 +36,9 @@ public: /// Updates the systems. void update(); + /// Add spaces to the engine + void addSpace(std::unique_ptr space); + /// Returns the instance of the engine, as there is only one instance of the /// engine. static Engine &instance(); @@ -38,6 +46,9 @@ public: private: /// Window Window window_; + + /// A vector of all the spaces + std::vector> spaces_; }; } // namespace yage -- cgit