28template<std::derived_from<Action> a>
33#pragma region static_functions
48 :
Action(
"AddActionToEntityAction")
58 :
Action(
"AddActionToEntityAction", duration)
68 float duration,
const th::Bezier& easingFunction,
76#pragma region overridden_functions
78 auto init() ->
void override
84 assert(success &&
"Adding an action list to an entity during AddActionToEntityAction failed.");
94 auto end() ->
void override
110#pragma region PlaceActionOnEntityAction_functions
116#pragma region member_variables
123#pragma region helper_functions
127#pragma region static_variables
Component that stores all actions currently affecting the parent entity.
A class that changes a variable over a set duration.
The class containing all entity elements.
Component that stores all actions currently affecting the parent entity.
Definition ActionList.h:30
virtual auto ActionShowMenu() -> void
Displays a window in imgui.
Definition Action.cpp:116
float initialDelay
Delay that acts between the action being created and the action initializing.
Definition Action.h:262
virtual auto render() const -> void
Function used to draw things to screen, useful for things such as debug drawing.
Definition Action.cpp:110
float endingDelay
Delay that acts after the action has finished updating but before it has ended.
Definition Action.h:264
auto operator=(const AddActionToEntityAction &) -> AddActionToEntityAction &=default
AddActionToEntityAction(Entity *intendedTargets, a intendedAction)
Definition AddActionToEntityAction.h:47
a actionToAdd
Definition AddActionToEntityAction.h:119
AddActionToEntityAction(const AddActionToEntityAction &)=default
auto end() -> void override
Virtual function that is called once, when an Action is finished executing.
Definition AddActionToEntityAction.h:94
~AddActionToEntityAction() override=default
AddActionToEntityAction(Entity *intendedTargets, a intendedAction, float duration)
Definition AddActionToEntityAction.h:57
auto operator=(AddActionToEntityAction &&other) noexcept -> AddActionToEntityAction &=default
auto ActionShowMenu() -> void override
Displays a window in imgui.
Definition AddActionToEntityAction.h:98
AddActionToEntityAction()=default
auto init() -> void override
Virtual function that is called once, when the Action is first starting up.
Definition AddActionToEntityAction.h:78
AddActionToEntityAction(AddActionToEntityAction &&other) noexcept=default
AddActionToEntityAction(Entity *intendedTargets, a intendedAction, float duration, const th::Bezier &easingFunction, float initialDelay, float endingDelay)
Definition AddActionToEntityAction.h:67
auto render() const -> void override
Function used to draw things to screen, useful for things such as debug drawing.
Definition AddActionToEntityAction.h:103
auto execute() -> void override
Virtual function that is called every frame to change a game object.
Definition AddActionToEntityAction.h:90
Entity * target
Definition AddActionToEntityAction.h:118
static auto make(const std::string &name) -> std::unique_ptr< T >
create an object and heap allocate it.
Definition Factory.h:45