|
Brunot
|
Holds functions that are useful to synchronize actions such that specific visual effects occur. More...
Functions | |
| template<std::derived_from< Action > a> | |
| auto | typical (const std::vector< Entity * > &intendedTargets, float delayBetweenGroups, int groups, a &intendedAction) -> void |
| Sets a group of actions to all have the same initial delay. | |
| template<std::derived_from< Action > a> | |
| auto | standardStagger (const std::vector< Entity * > &intendedTargets, float gapBetweenActions, a &intendedAction) -> void |
| Adds an action to every entity, but sets it up such that each action will have a small gap between itself and the next. | |
| template<std::derived_from< Action > a> | |
| auto | slightOverlap (const std::vector< Entity * > &intendedTargets, float overlapAmount, a &intendedAction) -> void |
| Adds an action to every entity, but sets it up such that each action will start a little bit before the last one ends. | |
| template<std::derived_from< Action > a> | |
| auto | Staircase (const std::vector< Entity * > &intendedTargets, float delayBetweenActions, a &intendedAction) -> void |
| All actions start at the same time, but actions take longer and longer. | |
| template<std::derived_from< Action > a> | |
| auto | Spiral (const std::vector< Entity * > &intendedTargets, float numberOfGroups, a &intendedAction) -> void |
| All actions start at the same time, but actions take longer and longer. | |
| template<std::derived_from< Action > a> | |
| auto | CreateStagger (const std::vector< a > &intendedAction, float delayBetweenActions) -> void |
| Creates a buffer between actions with the given delay. | |
| template<std::derived_from< Action > a> | |
| auto | SpreadAction (const std::vector< Entity * > &intendedTargets, const a &intendedAction) -> void |
| Gives every single Entity the same action, with no special effects. | |
Holds functions that are useful to synchronize actions such that specific visual effects occur.
For large scale sequences, like in scoring feedback, you will want to attach actions to entities en masse with individual initial delays. These functions exist to simplify the process for you. They work by modifying the actions initialDelay or Duration.
| auto AnimationSequence::CreateStagger | ( | const std::vector< a > & | intendedAction, |
| float | delayBetweenActions )->void |
Creates a buffer between actions with the given delay.
| a | The action type to be added to an entity. |
| intendedAction | The actions to have their initial delays changed |
| delayBetweenActions | How long the action will buffer between each entity. |
| auto AnimationSequence::slightOverlap | ( | const std::vector< Entity * > & | intendedTargets, |
| float | overlapAmount, | ||
| a & | intendedAction )->void |
Adds an action to every entity, but sets it up such that each action will start a little bit before the last one ends.
All actions have the same duration.
| a | The action type to be added to an entity. |
| intendedTargets | The entities you are effecting. |
| overlapAmount | How early you want the next action to occur |
| intendedAction | The action to be attached to an entity. |
| auto AnimationSequence::Spiral | ( | const std::vector< Entity * > & | intendedTargets, |
| float | numberOfGroups, | ||
| a & | intendedAction )->void |
All actions start at the same time, but actions take longer and longer.
This function only modifies duration and does NOT affect initial delay.
| a | The action type to be added to an entity. |
| intendedTargets | The entities you are effecting. |
| numberOfGroups | How much difference in duration you want between actions |
| intendedAction | The action to be attached to an entity. |
| auto AnimationSequence::SpreadAction | ( | const std::vector< Entity * > & | intendedTargets, |
| const a & | intendedAction )->void |
Gives every single Entity the same action, with no special effects.
| a | The action type to be added to an entity. |
| intendedTargets | The entities you are effecting. |
| intendedAction | The action to be attached to an entity. |
| auto AnimationSequence::Staircase | ( | const std::vector< Entity * > & | intendedTargets, |
| float | delayBetweenActions, | ||
| a & | intendedAction )->void |
All actions start at the same time, but actions take longer and longer.
This function only modifies duration and does NOT affect initial delay.
| a | The action type to be added to an entity. |
| intendedTargets | The entities you are effecting. |
| delayBetweenActions | How much difference in duration you want between actions |
| intendedAction | The action to be attached to an entity. |
| auto AnimationSequence::standardStagger | ( | const std::vector< Entity * > & | intendedTargets, |
| float | gapBetweenActions, | ||
| a & | intendedAction )->void |
Adds an action to every entity, but sets it up such that each action will have a small gap between itself and the next.
| a | The action type to be added to an entity. |
| intendedTargets | The entities you are effecting. |
| gapBetweenActions | How much time you want to elapse between each action occuring. You Can input negative numbers if you want them to have overlap |
| intendedAction | The action to be attached to an entity. |
| auto AnimationSequence::typical | ( | const std::vector< Entity * > & | intendedTargets, |
| float | delayBetweenGroups, | ||
| int | groups, | ||
| a & | intendedAction )->void |
Sets a group of actions to all have the same initial delay.
Best used within a for loop that increases groups with iterations.
| a | The action type to be added to an entity. |
| intendedTargets | The entities you are effecting. |
| delayBetweenGroups | The delay between groups. Increases as the group number does. Note that it will work best when the same initialDelay is used, but it is not required. |
| groups | Which place in line you would like the actions to happen. Think of it as the index that the sequence will play. |
| intendedAction | The action to be attached to an entity. |