43 auto
onUpdate(
float dt) ->
void override;
46 auto
load(const
Stream& stream) ->
void override;
47 auto
save(
Stream& stream) const ->
void override;
53 [[nodiscard]]
auto name() const -> const std::
string&;
54 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
ComponentTypeEnum
This enum lists out every type of component we have.
Definition Component.h:39
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:24
auto onRender() -> void override
called every frame after update has been called for every object.
Definition Scene.cpp:115
static auto bindLuaTypes(sol::state &lua) -> void
Definition Scene.cpp:290
bool _alwaysRenders
Definition Scene.h:82
auto save(Stream &stream) const -> void override
Implementations will load the state of a GameObject to a th::Json object.
Definition Scene.cpp:130
auto onUpdate(float dt) -> void override
called once every frame.
Definition Scene.cpp:109
auto activate() -> void
Definition Scene.cpp:145
Scene(Scene &&other) noexcept=default
auto popState() -> void
Definition Scene.cpp:256
auto operator=(Scene &&other) noexcept -> Scene &=default
auto name() const -> const std::string &
Definition Scene.cpp:135
bool _mainScene
Definition Scene.h:81
auto updateParent() -> void
Definition Scene.cpp:272
std::stack< SceneState > stack
Definition Scene.h:78
bool _pausesOtherScenes
Definition Scene.h:80
Scene * parentScene
Definition Scene.h:79
~Scene() override
Definition Scene.cpp:39
auto load(const Stream &stream) -> void override
Implementations will load the state of a GameObject from a th::Json Object.
Definition Scene.cpp:125
auto componentShowMenu() -> void override
Definition Scene.cpp:52
auto onEnterEngine() -> void override
hook that is called when a GameObject enters the Engine tree.
Definition Scene.cpp:119
auto applyState(SceneState newState) -> SceneState
sets the state of the scene (updating, rendering, and receiving Messages)
Definition Scene.cpp:204
auto endWindow() -> void override
currently unused, but intended to but was assumed to be necessary for a proper ImGui editor
Definition Scene.h:49
Scene(const Scene &)=default
Scene()
Definition Scene.cpp:28
auto operator=(const Scene &) -> Scene &=default
static auto getEnum() -> ComponentTypeEnum
Definition Scene.h:27
auto deactivate() -> void
Definition Scene.cpp:177
auto clone() const -> std::unique_ptr< GameObject > override
makes a copy a GameObject even if it's held polymorphically
Definition Scene.cpp:47
auto pushState(SceneState newState) -> void
Definition Scene.cpp:244
bool _registered
Definition Scene.h:83
auto getParentScene() const -> Scene *
Definition Scene.cpp:267
std::string _name
Definition Scene.h:77
Definition SceneManager.h:25