39 auto onUpdate(
float dt) ->
void override;
46 auto save(
Stream& stream)
const ->
void override;
47 [[nodiscard(
"adding child may fail")]]
auto addChild(std::unique_ptr<GameObject> newChild) ->
bool override;
57 template <std::derived_from<System> Sys>
sys::Json Stream
Definition AudioObject.h:20
the base class for the engine, most things inherit from this.
friend Node
Definition GameObject.h:86
GameObject(std::string typeName, gobj::Type parentType, gobj::Type type)
constructor for gameobject.
Definition GameObject.cpp:23
auto clone() const -> std::unique_ptr< GameObject > override
makes a copy a GameObject even if it's held polymorphically
Definition Root.cpp:31
auto endWindow() -> void override
currently unused, but intended to but was assumed to be necessary for a proper ImGui editor
Definition Root.h:41
auto onRender() -> void override
called every frame after update has been called for every object.
Definition Root.cpp:41
auto operator=(Root &&other) noexcept -> Root &=delete
auto showMenu() -> void override
Called before update each frame, for calling ImGui editor code relevant to the gameObject.
Definition Root.h:36
auto setup() -> void
setup the systems needed for the game.
Definition Root.cpp:79
Root(const Root &other)=delete
auto load(Stream &stream) -> void override
Implementations will load the state of a GameObject from a th::Json Object.
Definition Root.cpp:45
Root(Root &&other)=delete
auto save(Stream &stream) const -> void override
Implementations will load the state of a GameObject to a th::Json object.
Definition Root.cpp:49
auto startSystem() -> void
template function for adding systems safely to the root/engine, with logging
Definition Root.cpp:66
auto addChild(std::unique_ptr< GameObject > newChild) -> bool override
Adds a child to a GameObject.
Definition Root.cpp:53
auto operator=(const Root &other) -> Root &=delete
Root()
Definition Root.h:24
auto onUpdate(float dt) -> void override
called once every frame.
Definition Root.cpp:36
namespace for things relating to GameObject, other than GameObject itself
Definition Entity.h:229