Brunot
Loading...
Searching...
No Matches
ScaleUpAndDownAction.h
Go to the documentation of this file.
1
12// ____ __ __ __
13// /\__ _\/\ \ /\ \/\ \
14// \/_/\ \/\ \ \___ __ \ \ \_\ \ ___ __ __ ____ __
15// \ \ \ \ \ _ `\ /'__`\ \ \ _ \ / __`\/\ \/\ \ /',__\ /'__`\
16// \ \ \ \ \ \ \ \/\ __/ \ \ \ \ \/\ \L\ \ \ \_\ \/\__, `\/\ __/
17// \ \_\ \ \_\ \_\ \____\ \ \_\ \_\ \____/\ \____/\/\____/\ \____\
18// \/_/ \/_/\/_/\/____/ \/_/\/_/\/___/ \/___/ \/___/ \/____/
19
20
21#pragma once
22#include "Actions/Action.h"
23#include "Component/Transform.h"
24
30{
31public:
32
33#pragma region static_functions
34
35#pragma endregion
36
40 ~ScaleUpAndDownAction() override = default;
41 ScaleUpAndDownAction(ScaleUpAndDownAction&& other) noexcept = default;
42 auto operator=(ScaleUpAndDownAction&& other) noexcept -> ScaleUpAndDownAction& = default;
43
44 ScaleUpAndDownAction(float popAmount);
45 ScaleUpAndDownAction(float popAmount, float duration);
46 ScaleUpAndDownAction(Vector4D setStartScale, Vector4D setMaxScale, Vector4D setEndScale);
47 ScaleUpAndDownAction(Vector4D setStartScale, Vector4D setMaxScale, Vector4D setEndScale, float duration);
48 ScaleUpAndDownAction(Vector4D setStartScale, Vector4D setMaxScale, Vector4D setEndScale,
49 float duration, const th::Bezier& easingFunction, float initialDelay, float endingDelay);
50
51#pragma region overridden_functions
52
53
54 auto init() -> void override;
55 auto execute() -> void override;
56 auto end() -> void override;
57
58 auto ActionShowMenu() -> void override;
59 auto render() const -> void override;
60
61
62#pragma endregion
63
64#pragma region ScaleUpAndDownAction_functions
65
66#pragma endregion
67
68private:
69
70#pragma region member_variables
71
72 Transform* transform = nullptr;
73
77
78 bool scalingUp = true;
79
80 float popScale = 0.f;
81
82#pragma endregion
83
84#pragma region helper_functions
85
86 #pragma endregion
87
88#pragma region static_variables
89
90#pragma endregion
91
92};
A class that changes a variable over a set duration.
float initialDelay
Delay that acts between the action being created and the action initializing.
Definition Action.h:262
float endingDelay
Delay that acts after the action has finished updating but before it has ended.
Definition Action.h:264
Action()=default
auto end() -> void override
Virtual function that is called once, when an Action is finished executing.
Definition ScaleUpAndDownAction.cpp:101
ScaleUpAndDownAction()=default
ScaleUpAndDownAction(ScaleUpAndDownAction &&other) noexcept=default
auto operator=(const ScaleUpAndDownAction &) -> ScaleUpAndDownAction &=default
auto operator=(ScaleUpAndDownAction &&other) noexcept -> ScaleUpAndDownAction &=default
Vector4D endScale
Definition ScaleUpAndDownAction.h:76
auto init() -> void override
Virtual function that is called once, when the Action is first starting up.
Definition ScaleUpAndDownAction.cpp:66
auto execute() -> void override
Virtual function that is called every frame to change a game object.
Definition ScaleUpAndDownAction.cpp:81
Vector4D maxScale
Definition ScaleUpAndDownAction.h:75
Vector4D startingScale
Definition ScaleUpAndDownAction.h:74
~ScaleUpAndDownAction() override=default
bool scalingUp
Definition ScaleUpAndDownAction.h:78
auto render() const -> void override
Function used to draw things to screen, useful for things such as debug drawing.
Definition ScaleUpAndDownAction.cpp:110
ScaleUpAndDownAction(const ScaleUpAndDownAction &)=default
float popScale
Definition ScaleUpAndDownAction.h:80
Transform * transform
Definition ScaleUpAndDownAction.h:72
auto ActionShowMenu() -> void override
Displays a window in imgui.
Definition ScaleUpAndDownAction.cpp:105
Definition Transform.h:28
Definition Vector4D.h:28
Definition Bezier.h:30