30#pragma region static_functions
50#pragma region overridden_functions
53 auto
onUpdate(
float dt) ->
void override;
56 auto
save(
Stream& stream) const ->
void override;
62#pragma region ActionList_Functions
76 const std::function<
void(
GameObject*,
const T&)>& actionFunction,
77 const std::function<
float(
float,
float)>& easingFunction =
ac::LinearEase) ->
void
80 auto action =
Action<T>(startValue, endGoal, duration, owner, actionFunction, easingFunction);
82 std::shared_ptr<th::AnyAction>
result(any);
85 auto ownerEnt =
dynamic_cast<Entity*
>(owner);
92 auto newPtr = std::make_unique<ActionProxy>();
93 ownerEnt->addComponent(std::move(newPtr));
100 template <
typename... parameter>
103 auto action =
Action(actionInfo);
105 std::shared_ptr<th::AnyAction>
result(any);
108 auto ownerEnt =
dynamic_cast<Entity*
>(owner);
115 auto newPtr = std::make_unique<ActionProxy>();
116 ownerEnt->addComponent(std::move(newPtr));
124 auto addAction(
const std::shared_ptr<th::AnyAction>& action) -> void;
129#pragma region member_variables
133#pragma region helper_functions
138 return item->shouldRemove();
143#pragma region static_variables
std::vector< std::shared_ptr< th::AnyAction > > actions_vector
Definition ActionList.h:22
static FMOD_RESULT result
Definition AudioObject.cpp:27
sys::Json Stream
Definition AudioObject.h:20
The class containing all entity elements.
Definition ActionProxy.h:19
@ cActionProxy
Definition Component.h:62
friend Entity
Definition GameObject.h:84
GameObject(std::string typeName, gobj::Type parentType, gobj::Type type)
constructor for gameobject.
Definition GameObject.cpp:23
Type
Definition System.h:20
@ ActionList
Definition System.h:33
System(const std::string &typeName, Type systemType)
Definition System.cpp:75
auto endWindow() -> void override
currently unused, but intended to but was assumed to be necessary for a proper ImGui editor
Definition ActionList.cpp:89
auto operator=(const ActionList &other) -> ActionList &
Definition ActionList.cpp:37
auto addAction(parameter... actionInfo, GameObject *owner) -> void
Definition ActionList.h:101
auto operator=(ActionList &&other) noexcept -> ActionList &=default
auto onUpdate(float dt) -> void override
called once every frame.
Definition ActionList.cpp:59
auto save(Stream &stream) const -> void override
Implementations will load the state of a GameObject to a th::Json object.
Definition ActionList.cpp:84
auto load(Stream &stream) -> void override
Implementations will load the state of a GameObject from a th::Json Object.
Definition ActionList.cpp:79
static auto getEnum() -> Type
function required by all systems
Definition ActionList.h:35
ActionList()
Definition ActionList.cpp:22
static auto HasActionExpired
Definition ActionList.h:136
actions_vector currentActions
Definition ActionList.h:130
auto clone() const -> std::unique_ptr< GameObject > override
makes a copy a GameObject even if it's held polymorphically
Definition ActionList.cpp:54
~ActionList() override=default
auto onRender() -> void override
called every frame after update has been called for every object.
Definition ActionList.cpp:70
auto addAction(T startValue, T endGoal, float duration, GameObject *owner, const std::function< void(GameObject *, const T &)> &actionFunction, const std::function< float(float, float)> &easingFunction=ac::LinearEase) -> void
Definition ActionList.h:75
ActionList(ActionList &&other) noexcept=default
static const std::function LinearEase
Definition Action.h:26
the type of elements in a basic_json container
Definition GameObject.h:32
boost::type_erasure::any< boost::type_erasure::ActionConcept<>, boost::type_erasure::_self > AnyAction
Definition Any_Action.h:56