persona-3-dual
A DS demake of Persona 3
Loading...
Searching...
No Matches
UISequenceAnimation Class Reference

Plays groups of animations: each step waits until all in the group finish. More...

#include <UISequenceAnimation.hpp>

Inheritance diagram for UISequenceAnimation:
Collaboration diagram for UISequenceAnimation:

Public Types

using Group = etl::vector<std::shared_ptr<UIAnimation>, MAX_ANIMATIONS_PER_STEP>

Public Member Functions

void appendGroup (std::shared_ptr< UIAnimation > anim)
void joinGroup (std::shared_ptr< UIAnimation > anim)
void reverse () override
void reset () override
 Resets runtime state so the animation can play again (used by Loop).
Public Member Functions inherited from UIAnimation
virtual ~UIAnimation ()=default
 UIAnimation (const UIAnimation &)=delete
UIAnimation & operator= (const UIAnimation &)=delete
 UIAnimation (UIAnimation &&)=delete
UIAnimation & operator= (UIAnimation &&)=delete
bool tick (ae::q20_12_t dt)
 Advances the animation by dt seconds (Q20.12).
void pause ()
void resume ()
void cancel ()
bool isCancelled () const
bool isPaused () const
bool isDone () const
void setRepeat (UIRepeatMode mode, int count=-1)

Static Public Attributes

static constexpr std::size_t MAX_STEPS = 8
static constexpr std::size_t MAX_ANIMATIONS_PER_STEP = 4

Protected Member Functions

bool onUpdate (ae::q20_12_t dt) override
 Per-frame update.
Protected Member Functions inherited from UIAnimation
 UIAnimation ()=default
bool applyRepeat ()
 Applies repeat policy after a completed cycle.

Private Attributes

etl::vector< Group, MAX_STEPS > steps
int currentStep = 0

Additional Inherited Members

Protected Attributes inherited from UIAnimation
bool paused = false
bool cancelled = false
bool done = false
ae::q20_12_t elapsed {0}
UIRepeatMode repeatMode = UIRepeatMode::Once
int remainingRepeats = -1
 -1 = infinite when mode is not Once.

Detailed Description

Plays groups of animations: each step waits until all in the group finish.

Definition at line 22 of file UISequenceAnimation.hpp.

Member Typedef Documentation

◆ Group

using UISequenceAnimation::Group = etl::vector<std::shared_ptr<UIAnimation>, MAX_ANIMATIONS_PER_STEP>

Definition at line 27 of file UISequenceAnimation.hpp.

Member Function Documentation

◆ appendGroup()

void UISequenceAnimation::appendGroup ( std::shared_ptr< UIAnimation > anim)
inline

Definition at line 29 of file UISequenceAnimation.hpp.

Here is the caller graph for this function:

◆ joinGroup()

void UISequenceAnimation::joinGroup ( std::shared_ptr< UIAnimation > anim)
inline

Definition at line 41 of file UISequenceAnimation.hpp.

Here is the call graph for this function:

◆ onUpdate()

bool UISequenceAnimation::onUpdate ( ae::q20_12_t dt)
inlineoverrideprotectedvirtual

Per-frame update.

Returns
true when this cycle has completed.

Implements UIAnimation.

Definition at line 77 of file UISequenceAnimation.hpp.

◆ reset()

void UISequenceAnimation::reset ( )
inlineoverridevirtual

Resets runtime state so the animation can play again (used by Loop).

Reimplemented from UIAnimation.

Definition at line 60 of file UISequenceAnimation.hpp.

Here is the call graph for this function:

◆ reverse()

void UISequenceAnimation::reverse ( )
inlineoverridevirtual

Reimplemented from UIAnimation.

Definition at line 55 of file UISequenceAnimation.hpp.

Member Data Documentation

◆ currentStep

int UISequenceAnimation::currentStep = 0
private

Definition at line 103 of file UISequenceAnimation.hpp.

◆ MAX_ANIMATIONS_PER_STEP

std::size_t UISequenceAnimation::MAX_ANIMATIONS_PER_STEP = 4
staticconstexpr

Definition at line 26 of file UISequenceAnimation.hpp.

◆ MAX_STEPS

std::size_t UISequenceAnimation::MAX_STEPS = 8
staticconstexpr

Definition at line 25 of file UISequenceAnimation.hpp.

◆ steps

etl::vector<Group, MAX_STEPS> UISequenceAnimation::steps
private

Definition at line 102 of file UISequenceAnimation.hpp.


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