38 static auto shutdown(
int code) -> void;
49 template <std::derived_from<System> system>
52 auto typeId = system::getEnum();
53 auto isSystemType = [typeId](
const GameObject& object) ->
bool
55 return object.getKey().getSubtype()
56 ==
static_cast<unsigned short>(typeId);
61 return static_cast<system*
>(singleton->rootNode.findDirect(isSystemType));
Manages the heirarchical structure between Systems and Entities.
Root * root
Definition Engine.h:77
static auto getRoot() -> Root *
Definition Engine.h:70
static auto getSingleton() -> Engine *
Definition Engine.cpp:114
static auto shutdown(int code) -> void
Definition Engine.cpp:107
bool shouldShutdown
Definition Engine.h:78
Engine(Engine &other)=delete
int shutdownCode
Definition Engine.h:79
Engine()
Definition Engine.cpp:31
~Engine()
Definition Engine.cpp:42
static auto runSceneExitCallback(const std::string &sceneName) -> void
runs the onSceneExit callback on everything in the engine
Definition Engine.cpp:119
static auto runSceneStartCallback(const std::string &sceneName) -> void
runs the onSceneStart callback on everything in the engine
Definition Engine.cpp:129
double lastFrameTime
Definition Engine.h:80
auto run() -> int
Definition Engine.cpp:47
static const char *const GAME_NAME
Definition Engine.h:30
static auto getSystem() -> system *
A function to get a system.
Definition Engine.h:50
Node rootNode
Definition Engine.h:76
the base class for the engine, most things inherit from this.
Definition GameObject.h:83
Manages the heirarchical structure between Systems and Entities.
Definition Node.h:41
Definition SceneManager.h:58