Nui Engine
A game engine framework
Loading...
Searching...
No Matches
Engine.h
1#pragma once
2#include "Core/Common/CommonHeaders.h"
3#include "Core/App/AppBase.h"
4
5namespace Nui
6{
11 class Engine
12 {
13 public:
17 Engine();
18
22 ~Engine();
23
27 void Run();
28
32 void Quit();
33
38 inline F64 GetEngineUpTime() const noexcept { return m_engineTimer.GetElapsedSeconds(); }
39
44 AppBase* GetApp() const noexcept;
45
46 private:
50 std::unique_ptr<AppBase> m_app;
51
55 bool m_isRunning;
56
60 Timer m_engineTimer;
61 };
62}
Base class for all apps in Nui Engine.
Definition AppBase.h:14
Core engine class for Nui Engine.
Definition Engine.h:12
~Engine()
Destructor that shuts down the engine.
Definition Engine.cpp:100
Engine()
Default constructor that Initializes the engine.
Definition Engine.cpp:9
void Run()
Runs the main loop of the engine.
Definition Engine.cpp:36
AppBase * GetApp() const noexcept
Gets the application run by the engine.
Definition Engine.cpp:31
void Quit()
Quits the engine.
Definition Engine.cpp:95
F64 GetEngineUpTime() const noexcept
Returns the up time of the engine.
Definition Engine.h:38
Timer class.
Definition Timer.h:10
Time GetElapsedSeconds() const
Get elapsed time in seconds.
Definition Timer.h:80