/** --------------------------------------------------------------------------- * @file: engine.h * * Copyright (c) 2017 Yann Herklotz Grave * MIT License, see LICENSE file for more details. * ---------------------------------------------------------------------------- */ #pragma once #include "system.h" #include "../core/window.h" #include "../util/noncopyable.h" #include #include namespace yage { class Space; /** * Main engine class that contains a systems, the main loop and the update * function that updates all the systems. */ class Engine : public NonCopyable { public: ~Engine(); /// Initialize window and other aspects of the engine. void init(); /// Main game loop of the engine. void mainLoop(); /// 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(); private: /// Window Window window_; /// A vector of all the spaces std::vector> spaces_; }; } // namespace yage