Brunot
Loading...
Searching...
No Matches
MoveVerticalAction.h
Go to the documentation of this file.
1
11// ____ __ __ __
12// /\__ _\/\ \ /\ \/\ \
13// \/_/\ \/\ \ \___ __ \ \ \_\ \ ___ __ __ ____ __
14// \ \ \ \ \ _ `\ /'__`\ \ \ _ \ / __`\/\ \/\ \ /',__\ /'__`\
15// \ \ \ \ \ \ \ \/\ __/ \ \ \ \ \/\ \L\ \ \ \_\ \/\__, `\/\ __/
16// \ \_\ \ \_\ \_\ \____\ \ \_\ \_\ \____/\ \____/\/\____/\ \____\
17// \/_/ \/_/\/_/\/____/ \/_/\/_/\/___/ \/___/ \/___/ \/____/
18
19
20#pragma once
21#include "Actions/Action.h"
22
23class Transform;
29{
30public:
31
32#pragma region static_functions
33
34#pragma endregion
35
36 MoveVerticalAction() = default;
39 ~MoveVerticalAction() override = default;
40 MoveVerticalAction(MoveVerticalAction&& other) noexcept = default;
41 auto operator=(MoveVerticalAction&& other) noexcept -> MoveVerticalAction& = default;
42
43 // I have to comment this one out or else it throws an error
44 MoveVerticalAction(float endingValue);
45 MoveVerticalAction(float endingValue, float duration);
46 MoveVerticalAction(float endingValue, float duration, const th::Bezier& easingFunction, float initialDelay, float endingDelay);
47
48#pragma region overridden_functions
49
50
51 auto init() -> void override;
52 auto execute() -> void override;
53 auto end() -> void override;
54
55 auto ActionShowMenu() -> void override;
56 auto render() const -> void override;
57
58
59#pragma endregion
60
61#pragma region MoveVerticalAction_functions
62
63#pragma endregion
64
65private:
66
67#pragma region member_variables
68
69
70 // This variable is nice to have just so you don't need to get the transform every frame in execute
71 Transform* transform = nullptr;
72
73 float startingHeight = 0.f;
75
76
77#pragma endregion
78
79#pragma region helper_functions
80
81 #pragma endregion
82
83#pragma region static_variables
84
85#pragma endregion
86
87};
A class that changes a variable over a set duration.
float initialDelay
Definition Action.h:239
float endingDelay
Definition Action.h:240
Action()=default
auto operator=(const MoveVerticalAction &) -> MoveVerticalAction &=default
auto init() -> void override
Virtual function that is called once, when the Action is first starting up.
Definition MoveVerticalAction.cpp:47
MoveVerticalAction()=default
auto operator=(MoveVerticalAction &&other) noexcept -> MoveVerticalAction &=default
~MoveVerticalAction() override=default
float endingHeight
Definition MoveVerticalAction.h:74
MoveVerticalAction(const MoveVerticalAction &)=default
MoveVerticalAction(MoveVerticalAction &&other) noexcept=default
auto execute() -> void override
Virtual function that is called every frame to change a game object.
Definition MoveVerticalAction.cpp:59
float startingHeight
Definition MoveVerticalAction.h:73
auto end() -> void override
Virtual function that is called once, when an Action is finished executing.
Definition MoveVerticalAction.cpp:65
auto render() const -> void override
Function used to draw things to screen, useful for things such as debug drawing.
Definition MoveVerticalAction.cpp:74
auto ActionShowMenu() -> void override
Displays a window in imgui.
Definition MoveVerticalAction.cpp:69
Transform * transform
Definition MoveVerticalAction.h:71
Definition Transform.h:27
Definition Bezier.h:30