Brunot
Loading...
Searching...
No Matches
CreateAnimationSequenceAction< a > Class Template Reference

Calls AnimationSequence to adjust values automatically. More...

#include <CreateAnimationSequenceAction.h>

Inheritance diagram for CreateAnimationSequenceAction< a >:
[legend]
Collaboration diagram for CreateAnimationSequenceAction< a >:
[legend]

Public Member Functions

 CreateAnimationSequenceAction ()=default
 CreateAnimationSequenceAction (const CreateAnimationSequenceAction &)=default
auto operator= (const CreateAnimationSequenceAction &) -> CreateAnimationSequenceAction &=default
 ~CreateAnimationSequenceAction () override=default
 CreateAnimationSequenceAction (CreateAnimationSequenceAction &&other) noexcept=default
auto operator= (CreateAnimationSequenceAction &&other) noexcept -> CreateAnimationSequenceAction &=default
 CreateAnimationSequenceAction (const std::vector< Entity * > &intendedTargets, float entInitialDelay, int setGroup, a intendedAction)
 Calls AnimationSequence based off of parameters given.
 CreateAnimationSequenceAction (const std::vector< Entity * > &intendedTargets, float entInitialDelay, int setGroup, a intendedAction, float duration)
 Calls AnimationSequence based off of parameters given.
 CreateAnimationSequenceAction (const std::vector< Entity * > &intendedTargets, float entInitialDelay, int setGroup, a intendedAction, float duration, const th::Bezier &easingFunction, float initialDelay, float endingDelay)
 Calls AnimationSequence based off of parameters given.
auto init () -> void override
 Virtual function that is called once, when the Action is first starting up.
auto execute () -> void override
 Virtual function that is called every frame to change a game object.
auto end () -> void override
 Virtual function that is called once, when an Action is finished executing.
auto ActionShowMenu () -> void override
 Displays a window in imgui.
auto render () const -> void override
 Function used to draw things to screen, useful for things such as debug drawing.
Public Member Functions inherited from Action
 Action ()=default
 Action (const Action &)=default
auto operator= (const Action &) -> Action &=default
virtual ~Action ()=default
 Action (Action &&other) noexcept=default
auto operator= (Action &&other) noexcept -> Action &=default
auto operator== (const Action &other) const -> bool
 Action (std::string name)
 Action (std::string name, float duration)
 Action (std::string name, float duration, const th::Bezier &bezierCurve, float initialDelay, float endingDelay)
auto update (float dt) -> void
 Universal update function that handles calling init, update, and end at the right time.
auto shouldRemove () const -> bool
auto getOwner () const -> Entity *
auto setOwner (Entity *newObject) -> void
auto getHasInitialized () const -> bool
auto getHasExecuted () const -> bool
auto getHasEnded () const -> bool
auto isPaused () const -> bool
auto setPaused (bool newState) -> void
auto isBlocking () const -> bool
auto setBlocking (bool newState) -> void
auto setInitialDelay (float delay) -> void
auto getInitialDelay () const -> float
auto setDuration (float duration) -> void
auto getDuration () const -> float
auto setEndingDelay (float delay) -> void
auto getEndingDelay () const -> float
auto getTotalLifetime () const -> float
auto getName () -> std::string
 Function used for displaying info about what an Action does.
auto getCompletionPercentage () const -> float
 Function used to see how much the action has completed.
auto getCurve () const -> th::Bezier
 Function used to see which type of curve an action has.
auto setCurve (const th::Bezier &curve) -> void
 set the curve of the function

Private Attributes

std::vector< Entity * > batch = {}
float targetInitialDelay = 0.0f
int group = 0
std::vector< a > actionToAdd

Additional Inherited Members

Protected Member Functions inherited from Action
auto percentageComplete () const -> float
template<typename T>
auto lerpBasedOnTime (const T &start, const T &end) -> T
Protected Attributes inherited from Action
EntitychangingObject = nullptr
std::string actionName = "BaseAction"
bool blocking = false
 If an action is blocking, it stops all actions after it in an ActionList from updating.

Detailed Description

template<std::derived_from< Action > a>
class CreateAnimationSequenceAction< a >

Calls AnimationSequence to adjust values automatically.

Constructor & Destructor Documentation

◆ CreateAnimationSequenceAction() [1/6]

template<std::derived_from< Action > a>
CreateAnimationSequenceAction< a >::CreateAnimationSequenceAction ( )
default
Here is the caller graph for this function:

◆ CreateAnimationSequenceAction() [2/6]

template<std::derived_from< Action > a>
CreateAnimationSequenceAction< a >::CreateAnimationSequenceAction ( const CreateAnimationSequenceAction< a > & )
default
Here is the call graph for this function:

◆ ~CreateAnimationSequenceAction()

template<std::derived_from< Action > a>
CreateAnimationSequenceAction< a >::~CreateAnimationSequenceAction ( )
overridedefault

◆ CreateAnimationSequenceAction() [3/6]

template<std::derived_from< Action > a>
CreateAnimationSequenceAction< a >::CreateAnimationSequenceAction ( CreateAnimationSequenceAction< a > && other)
defaultnoexcept
Here is the call graph for this function:

◆ CreateAnimationSequenceAction() [4/6]

template<std::derived_from< Action > a>
CreateAnimationSequenceAction< a >::CreateAnimationSequenceAction ( const std::vector< Entity * > & intendedTargets,
float entInitialDelay,
int setGroup,
a intendedAction )

Calls AnimationSequence based off of parameters given.

Parameters
intendedTargetsA vector of the entities that will have their delays corrected.
entInitialDelayThe delays between each group.
setGroupThe index/placement in line that the actions will happen.
intendedActionThe action to place on entities.
Here is the call graph for this function:

◆ CreateAnimationSequenceAction() [5/6]

template<std::derived_from< Action > a>
CreateAnimationSequenceAction< a >::CreateAnimationSequenceAction ( const std::vector< Entity * > & intendedTargets,
float entInitialDelay,
int setGroup,
a intendedAction,
float duration )

Calls AnimationSequence based off of parameters given.

Parameters
intendedTargetsA vector of the entities that will have their delays corrected.
entInitialDelayThe delays between each group.
setGroupThe index/placement in line that the actions will happen.
intendedActionThe action to place on entities.
Here is the call graph for this function:

◆ CreateAnimationSequenceAction() [6/6]

template<std::derived_from< Action > a>
CreateAnimationSequenceAction< a >::CreateAnimationSequenceAction ( const std::vector< Entity * > & intendedTargets,
float entInitialDelay,
int setGroup,
a intendedAction,
float duration,
const th::Bezier & easingFunction,
float initialDelay,
float endingDelay )

Calls AnimationSequence based off of parameters given.

Parameters
intendedTargetsA vector of the entities that will have their delays corrected.
entInitialDelayThe delays between each group.
setGroupThe index/placement in line that the actions will happen.
intendedActionThe action to place on entities.
Here is the call graph for this function:

Member Function Documentation

◆ ActionShowMenu()

template<std::derived_from< Action > a>
void CreateAnimationSequenceAction< a >::ActionShowMenu ( ) ->void
overridevirtual

Displays a window in imgui.

Reimplemented from Action.

Here is the call graph for this function:

◆ end()

template<std::derived_from< Action > a>
void CreateAnimationSequenceAction< a >::end ( ) ->void
overridevirtual

Virtual function that is called once, when an Action is finished executing.

Reimplemented from Action.

◆ execute()

template<std::derived_from< Action > a>
void CreateAnimationSequenceAction< a >::execute ( ) ->void
overridevirtual

Virtual function that is called every frame to change a game object.

Reimplemented from Action.

◆ init()

template<std::derived_from< Action > a>
void CreateAnimationSequenceAction< a >::init ( ) ->void
overridevirtual

Virtual function that is called once, when the Action is first starting up.

Reimplemented from Action.

◆ operator=() [1/2]

template<std::derived_from< Action > a>
auto CreateAnimationSequenceAction< a >::operator= ( const CreateAnimationSequenceAction< a > & ) ->CreateAnimationSequenceAction &=default
default
Here is the call graph for this function:

◆ operator=() [2/2]

template<std::derived_from< Action > a>
auto CreateAnimationSequenceAction< a >::operator= ( CreateAnimationSequenceAction< a > && other) ->CreateAnimationSequenceAction &=default
defaultnoexcept
Here is the call graph for this function:

◆ render()

template<std::derived_from< Action > a>
void CreateAnimationSequenceAction< a >::render ( ) const->void
overridevirtual

Function used to draw things to screen, useful for things such as debug drawing.

Todo
: Implement debug draw rendering

Reimplemented from Action.

Here is the call graph for this function:

Member Data Documentation

◆ actionToAdd

template<std::derived_from< Action > a>
std::vector<a> CreateAnimationSequenceAction< a >::actionToAdd
private

◆ batch

template<std::derived_from< Action > a>
std::vector<Entity*> CreateAnimationSequenceAction< a >::batch = {}
private

◆ group

template<std::derived_from< Action > a>
int CreateAnimationSequenceAction< a >::group = 0
private

◆ targetInitialDelay

template<std::derived_from< Action > a>
float CreateAnimationSequenceAction< a >::targetInitialDelay = 0.0f
private

The documentation for this class was generated from the following file: