aboutsummaryrefslogtreecommitdiffstats
path: root/yage/entity/engine.h
diff options
context:
space:
mode:
Diffstat (limited to 'yage/entity/engine.h')
-rw-r--r--yage/entity/engine.h17
1 files changed, 14 insertions, 3 deletions
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 <memory>
#include <vector>
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> 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<std::unique_ptr<Space>> spaces_;
};
} // namespace yage