44 auto
onUpdate(
float dt) ->
void override;
47 auto
load(const
Stream& stream) ->
void override;
48 auto
save(
Stream& stream) const ->
void override;
60 template <typename ActionType>
61 auto
pushBack(const ActionType& newAction) ->
void
63 allActions.emplace_back(std::make_unique<ActionType>(newAction));
67 template <
typename ActionType>
84 return item->shouldRemove();
A class that changes a variable over a set duration.
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
friend auto to_json(json &j, const ActionList &a) -> void
Definition ActionList.cpp:147
auto parentTo(GameObject *newParent) -> bool override
Sets the GameObject as a child of another GameObject.
Definition ActionList.cpp:60
auto load(const Stream &stream) -> void override
Implementations will load the state of a GameObject from a th::Json Object.
Definition ActionList.cpp:137
auto onRender() -> void override
called every frame after update has been called for every object.
Definition ActionList.cpp:133
std::vector< std::unique_ptr< Action > > allActions
Definition ActionList.h:79
auto componentShowMenu() -> void override
Definition ActionList.cpp:77
auto pushBack(const std::unique_ptr< Action > &newAction) -> void
Definition ActionList.cpp:159
ActionList()
Definition ActionList.cpp:24
auto onUpdate(float dt) -> void override
called once every frame.
Definition ActionList.cpp:113
auto operator=(const ActionList &) -> ActionList &
Definition ActionList.cpp:39
auto clear() -> void
Definition ActionList.cpp:171
auto save(Stream &stream) const -> void override
Implementations will load the state of a GameObject to a th::Json object.
Definition ActionList.cpp:142
auto endWindow() -> void override
currently unused, but intended to but was assumed to be necessary for a proper ImGui editor
Definition ActionList.cpp:129
auto operator=(ActionList &&other) noexcept -> ActionList &=default
auto clone() const -> std::unique_ptr< GameObject > override
makes a copy a GameObject even if it's held polymorphically
Definition ActionList.cpp:72
ActionList(ActionList &&other) noexcept=default
friend auto from_json(const json &j, ActionList &a) -> void
Definition ActionList.cpp:154
auto operator[](int index) const -> Action &
Definition ActionList.cpp:50
auto pushFront(const ActionType &newAction) -> void
Definition ActionList.h:68
static auto HasActionExpired
Definition ActionList.h:82
~ActionList() override=default
auto pushFront(const std::unique_ptr< Action > &newAction) -> void
Definition ActionList.cpp:165
Component(ComponentTypeEnum type, const char *typeName)
Definition Component.cpp:72
auto getEntityParent() const -> Entity *
gets the parent as an Entity.
Definition Component.cpp:106
GameObject(std::string typeName, gobj::Type parentType, gobj::Type type)
constructor for gameobject.
Definition GameObject.cpp:23