#pragma once #include "src/Core/Core.h" #include "src/Window.h" #include "src/Scene/Scene.h" #include "src/Resource/Project.h" #include "src/Core/Logger.h" /* TODOS: */ // Welcome to the Nuake source code. namespace Nuake { class Engine { private: static Ref s_CurrentWindow; static Ref s_CurrentProject; static Ref s_CurrentScene; static bool s_IsPlayMode; static float s_LastFrameTime; static float s_FixedUpdateRate; static float s_FixedUpdateDifference; static float s_Time; static Timestep s_TimeStep; public: static void Init(); // Initialize the engine. static void Tick(); // Updates everything, called every frame. static void Close(); // Shutdown the engine. static void EnterPlayMode(); // Start the game static void ExitPlayMode(); // Stops the game // Custom drawing should happen in between these two static void Draw(); // Start new frame static void EndDraw(); // Swap buffer static bool IsPlayMode() { return s_IsPlayMode; } static inline float GetTime() { return s_Time; } static inline Timestep GetTimestep() { return s_TimeStep; } static Ref GetCurrentWindow(); static bool LoadScene(Ref scene); static Ref GetCurrentScene(); static bool LoadProject(Ref project); static Ref GetProject(); }; }