38 auto
onUpdate(
float dt) ->
void override;
42 auto
save(
Stream& stream) const ->
void override;
48 [[nodiscard]]
auto name() const -> const std::
string&;
49 auto
name(const std::
string&
name) ->
void;
auto to_json(json &j, const AudioObject &a) -> void
Definition AudioObject.cpp:376
auto from_json(const json &j, AudioObject &a) -> void
Definition AudioObject.cpp:387
sys::Json Stream
Definition AudioObject.h:20
The base class for components, holding all of their shared All components should inherit from this.
nlohmann::json json
Definition Json.cpp:19
Component(ComponentTypeEnum type, const char *typeName)
Definition Component.cpp:72
GameObject(std::string typeName, gobj::Type parentType, gobj::Type type)
constructor for gameobject.
Definition GameObject.cpp:23
auto onRender() -> void override
called every frame after update has been called for every object.
Definition Scene.cpp:114
bool _alwaysRenders
Definition Scene.h:76
auto save(Stream &stream) const -> void override
Implementations will load the state of a GameObject to a th::Json object.
Definition Scene.cpp:129
auto onUpdate(float dt) -> void override
called once every frame.
Definition Scene.cpp:108
auto activate() -> void
Definition Scene.cpp:144
Scene(Scene &&other) noexcept=default
auto popState() -> void
Definition Scene.cpp:255
auto operator=(Scene &&other) noexcept -> Scene &=default
auto name() const -> const std::string &
Definition Scene.cpp:134
bool _mainScene
Definition Scene.h:75
auto updateParent() -> void
Definition Scene.cpp:271
std::stack< SceneState > stack
Definition Scene.h:72
bool _pausesOtherScenes
Definition Scene.h:74
Scene * parentScene
Definition Scene.h:73
~Scene() override
Definition Scene.cpp:38
auto componentShowMenu() -> void override
Definition Scene.cpp:51
auto onEnterEngine() -> void override
hook that is called when a GameObject enters the Engine tree.
Definition Scene.cpp:118
auto applyState(SceneState newState) -> SceneState
sets the state of the scene (updating, rendering, and receiving Messages)
Definition Scene.cpp:203
auto load(Stream &stream) -> void override
Implementations will load the state of a GameObject from a th::Json Object.
Definition Scene.cpp:124
auto endWindow() -> void override
currently unused, but intended to but was assumed to be necessary for a proper ImGui editor
Definition Scene.h:44
Scene(const Scene &)=default
Scene()
Definition Scene.cpp:27
auto operator=(const Scene &) -> Scene &=default
auto deactivate() -> void
Definition Scene.cpp:176
auto clone() const -> std::unique_ptr< GameObject > override
makes a copy a GameObject even if it's held polymorphically
Definition Scene.cpp:46
auto pushState(SceneState newState) -> void
Definition Scene.cpp:243
bool _registered
Definition Scene.h:77
auto getParentScene() const -> Scene *
Definition Scene.cpp:266
std::string _name
Definition Scene.h:71
Definition SceneManager.h:24