60 auto onUpdate(
float dt) ->
void override;
66 auto load(
const Stream& stream) ->
void override;
67 auto save(
Stream& stream)
const ->
void override;
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
The component that holds the texture behind everything.
Definition Background.h:41
Background()
Definition Background.cpp:38
friend auto from_json(const json &j, Background &p) -> void
Definition Background.cpp:83
auto clone() const -> std::unique_ptr< GameObject > override
makes a copy a GameObject even if it's held polymorphically
Definition Background.cpp:43
static auto getEnum() -> ComponentTypeEnum
Definition Background.h:43
Background(const Background &)=default
friend auto to_json(json &j, const Background &p) -> void
Definition Background.cpp:76
auto operator=(const Background &) -> Background &=default
auto endWindow() -> void override
currently unused, but intended to but was assumed to be necessary for a proper ImGui editor
Definition Background.h:62
static auto bindLuaTypes(sol::state &lua) -> void
Definition Background.h:47
Background(Background &&other) noexcept=default
auto load(const Stream &stream) -> void override
Implementations will load the state of a GameObject from a th::Json Object.
Definition Background.cpp:66
auto save(Stream &stream) const -> void override
Implementations will load the state of a GameObject to a th::Json object.
Definition Background.cpp:71
~Background() override=default
auto onUpdate(float dt) -> void override
called once every frame.
Definition Background.cpp:48
auto componentShowMenu() -> void override
Definition Background.h:57
auto operator=(Background &&other) noexcept -> Background &=default
auto onRender() -> void override
called every frame after update has been called for every object.
Definition Background.cpp:62
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