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