persona-3-dual
A DS demake of Persona 3
Loading...
Searching...
No Matches
UIAnimationComponent.hpp
Go to the documentation of this file.
1
7
8#pragma once
9
10#include "types/aeTypes.hpp"
12
13#include <aegis/component.hpp>
14
18class UIAnimationComponent : public ae::Component
19{
20 public:
21 static constexpr ae::ComponentTypeID TYPE_ID = static_cast<ae::ComponentTypeID>(ComponentType::Animation);
22
23 void init() override
24 {
25 active = true;
26 }
27
28 void update(ae::q20_12_t dt) override;
29
30 void destroy() override;
31
32 ae::ComponentTypeID getType() const override
33 {
34 return TYPE_ID;
35 }
36
41 template <typename T> UIPropertyAnimationBuilder<T> animate(T& target)
42 {
43 return animator.animate(target);
44 }
45
51 {
52 return animator.sequence();
53 }
54
58 void cancelAll()
59 {
60 animator.cancelAll();
61 }
62
63 protected:
64 void submitToManager() override
65 {
66 }
67
68 private:
70};
Runs a fixed-capacity set of concurrent UI animations.
ECS component that owns a UIAnimator for entity-scoped UI tweens.
UISequenceBuilder sequence()
Starts building a multi-step (sequenced/parallel) animation.
ae::ComponentTypeID getType() const override
void update(ae::q20_12_t dt) override
void cancelAll()
Cancels every animation currently running on this component.
UIPropertyAnimationBuilder< T > animate(T &target)
Starts building a tween for a single value owned by the caller.
static constexpr ae::ComponentTypeID TYPE_ID
Owns and ticks active UI animations. Safe against cancel-during-tick.
Fluent builder for UIPropertyAnimation. Must be started via a UIAnimator owner.
Fluent builder for UISequenceAnimation. Requires a UIAnimator to start.