35 static auto shutdown(
int code) -> void;
45 template <std::derived_from<System> system>
48 auto typeId = system::getEnum();
49 auto isSystemType = [typeId](
const GameObject& object) ->
bool
51 return object.getKey().getSubtype()
52 ==
static_cast<unsigned short>(typeId);
57 return static_cast<system*
>(singleton->rootNode.findDirect(isSystemType));
Manages the heirarchical structure between Systems and Entities.
Root * root
Definition Engine.h:73
static auto getRoot() -> Root *
Definition Engine.h:66
static auto getSingleton() -> Engine *
Definition Engine.cpp:112
static auto shutdown(int code) -> void
Definition Engine.cpp:105
bool shouldShutdown
Definition Engine.h:74
Engine(Engine &other)=delete
int shutdownCode
Definition Engine.h:75
Engine()
Definition Engine.cpp:29
~Engine()
Definition Engine.cpp:40
static auto runSceneExitCallback(const std::string &sceneName) -> void
runs the onSceneExit callback on everything in the engine
Definition Engine.cpp:117
static auto runSceneStartCallback(const std::string &sceneName) -> void
runs the onSceneStart callback on everything in the engine
Definition Engine.cpp:127
double lastFrameTime
Definition Engine.h:76
auto run() -> int
Definition Engine.cpp:45
static auto getSystem() -> system *
A function to get a system.
Definition Engine.h:46
Node rootNode
Definition Engine.h:72
the base class for the engine, most things inherit from this.
Definition GameObject.h:77
Manages the heirarchical structure between Systems and Entities.
Definition Node.h:41
Definition SceneManager.h:57