#pragma once #include #include "Engine/Graphics/UI.hpp" #include "Engine/Graphics/DebugUI.hpp" #include "Engine/Graphics/3DRenderer.hpp" #include "Engine/Utils/Timers.hpp" typedef enum eGameStatus { GAME_INIT, GAME_RUNNING, GAME_QUIT } GAME_STATUS; class Game final { public: static Game& getInstance(std::shared_ptr mainWnd, bool dbgFlag) { if (smInstance == nullptr) smInstance = new Game(mainWnd, dbgFlag); return *smInstance; } ~Game() = default; Game(Game&&) = default; Game& operator= (Game&&) = default; Game(Game const&) = delete; Game& operator= (Game const&) = delete; GAME_STATUS Tick(); private: Game(std::shared_ptr mainWnd, bool dbgFlag) noexcept(false); static Game* smInstance; void Update(); void KeyboardInputsCheck(); void Render(); bool mbDbgModeEnabled; std::unique_ptr mDbgUI = nullptr; SysTimer mSysTimer; std::unique_ptr mPerfsTimer = nullptr; std::shared_ptr mMainWindow; std::shared_ptr mWorld3D; std::unique_ptr mCockpitUI; std::unique_ptr mWorldUI; };