Brunot
Loading...
Searching...
No Matches
ChangeColorAction.h
Go to the documentation of this file.
1
10// ____ __ __ __
11// /\__ _\/\ \ /\ \/\ \
12// \/_/\ \/\ \ \___ __ \ \ \_\ \ ___ __ __ ____ __
13// \ \ \ \ \ _ `\ /'__`\ \ \ _ \ / __`\/\ \/\ \ /',__\ /'__`\
14// \ \ \ \ \ \ \ \/\ __/ \ \ \ \ \/\ \L\ \ \ \_\ \/\__, `\/\ __/
15// \ \_\ \ \_\ \_\ \____\ \ \_\ \_\ \____/\ \____/\/\____/\ \____\
16// \/_/ \/_/\/_/\/____/ \/_/\/_/\/___/ \/___/ \/___/ \/____/
17
18#pragma once
19#include "Actions/Action.h"
20#include "Component/Sprite.h"
21
27{
28public:
29
30#pragma region static_functions
31
32#pragma endregion
33
34 ChangeColorAction() = default;
36 auto operator=(const ChangeColorAction&) -> ChangeColorAction& = default;
37 ~ChangeColorAction() override = default;
38 ChangeColorAction(ChangeColorAction&& other) noexcept = default;
39 auto operator=(ChangeColorAction&& other) noexcept -> ChangeColorAction& = default;
40
42 ChangeColorAction(Vector4D endingColor, float duration);
43 ChangeColorAction(Vector4D endingColor, float duration, const th::Bezier& easingFunction, float initialDelay, float endingDelay);
44
45#pragma region overridden_functions
46
47
48 auto init() -> void override;
49 auto execute() -> void override;
50 auto end() -> void override;
51
52 auto ActionShowMenu() -> void override;
53 auto render() const -> void override;
54
55#pragma endregion
56
57#pragma region ChangeColorAction_functions
58
59#pragma endregion
60
61private:
62
63#pragma region member_variables
64
65 Sprite* sprite = nullptr;
66
69
70#pragma endregion
71
72#pragma region helper_functions
73
74 #pragma endregion
75
76#pragma region static_variables
77
78#pragma endregion
79
80};
A class that changes a variable over a set duration.
float initialDelay
Definition Action.h:239
float endingDelay
Definition Action.h:240
Action()=default
ChangeColorAction()=default
auto end() -> void override
Virtual function that is called once, when an Action is finished executing.
Definition ChangeColorAction.cpp:53
auto execute() -> void override
Virtual function that is called every frame to change a game object.
Definition ChangeColorAction.cpp:48
auto operator=(const ChangeColorAction &) -> ChangeColorAction &=default
auto render() const -> void override
Function used to draw things to screen, useful for things such as debug drawing.
Definition ChangeColorAction.cpp:62
Vector4D startingColor
Definition ChangeColorAction.h:67
auto ActionShowMenu() -> void override
Displays a window in imgui.
Definition ChangeColorAction.cpp:57
ChangeColorAction(const ChangeColorAction &)=default
Vector4D endingColor
Definition ChangeColorAction.h:68
auto init() -> void override
Virtual function that is called once, when the Action is first starting up.
Definition ChangeColorAction.cpp:42
auto operator=(ChangeColorAction &&other) noexcept -> ChangeColorAction &=default
~ChangeColorAction() override=default
ChangeColorAction(ChangeColorAction &&other) noexcept=default
A component that renders an image on an entity, or text.
Definition Sprite.h:38
Definition Sprite.cpp:344
Definition Vector4D.h:23
Definition Bezier.h:30