persona-3-dual
A DS demake of Persona 3
Loading...
Searching...
No Matches
UIDelayAnimation.hpp
Go to the documentation of this file.
1
6
7
#pragma once
8
9
#include "
managers/MathManager.hpp
"
10
#include "
uiAnimation/UIAnimation.hpp
"
11
15
class
UIDelayAnimation
:
public
UIAnimation
16
{
17
public
:
18
explicit
UIDelayAnimation
(
int
durationMs)
19
{
20
duration
= MathManager::getInstance().div(ae::q20_12_t{durationMs}, ae::q20_12_t{1000});
21
}
22
23
void
reset
()
override
24
{
25
UIAnimation::reset
();
26
}
27
28
protected
:
29
bool
onUpdate
(ae::q20_12_t dt)
override
30
{
31
elapsed
+= dt;
32
return
elapsed
>=
duration
;
33
}
34
35
private
:
36
ae::q20_12_t
duration
{0};
37
};
MathManager.hpp
UIAnimation.hpp
Base class for one UI animation step (property, delay, callback, sequence).
UIAnimation::elapsed
ae::q20_12_t elapsed
Definition
UIAnimation.hpp:152
UIAnimation::reset
virtual void reset()
Resets runtime state so the animation can play again (used by Loop).
Definition
UIAnimation.hpp:62
UIAnimation::UIAnimation
UIAnimation(const UIAnimation &)=delete
UIDelayAnimation::reset
void reset() override
Resets runtime state so the animation can play again (used by Loop).
Definition
UIDelayAnimation.hpp:23
UIDelayAnimation::UIDelayAnimation
UIDelayAnimation(int durationMs)
Definition
UIDelayAnimation.hpp:18
UIDelayAnimation::duration
ae::q20_12_t duration
Definition
UIDelayAnimation.hpp:36
UIDelayAnimation::onUpdate
bool onUpdate(ae::q20_12_t dt) override
Per-frame update.
Definition
UIDelayAnimation.hpp:29
source
uiAnimation
UIDelayAnimation.hpp
Generated by
1.15.0