Brunot
Loading...
Searching...
No Matches
MoveToPointAction.h
Go to the documentation of this file.
1
11// ____ __ __ __
12// /\__ _\/\ \ /\ \/\ \
13// \/_/\ \/\ \ \___ __ \ \ \_\ \ ___ __ __ ____ __
14// \ \ \ \ \ _ `\ /'__`\ \ \ _ \ / __`\/\ \/\ \ /',__\ /'__`\
15// \ \ \ \ \ \ \ \/\ __/ \ \ \ \ \/\ \L\ \ \ \_\ \/\__, `\/\ __/
16// \ \_\ \ \_\ \_\ \____\ \ \_\ \_\ \____/\ \____/\/\____/\ \____\
17// \/_/ \/_/\/_/\/____/ \/_/\/_/\/___/ \/___/ \/___/ \/____/
18
19
20
21
22
23#pragma once
24#include "Actions/Action.h"
25#include "Component/Transform.h"
26
32{
33public:
34
35#pragma region static_functions
36
37#pragma endregion
38
39 MoveToPointAction() = default;
41 auto operator=(const MoveToPointAction&) -> MoveToPointAction& = default;
42 ~MoveToPointAction() override = default;
43 MoveToPointAction(MoveToPointAction&& other) noexcept = default;
44 auto operator=(MoveToPointAction&& other) noexcept -> MoveToPointAction& = default;
45
46
50 MoveToPointAction(Point2D endingPosition, float duration, const th::Bezier& easingFunction, float initialDelay, float endingDelay);
51
52#pragma region overridden_functions
53
54
55 auto init() -> void override;
56 auto execute() -> void override;
57 auto end() -> void override;
58
59 auto ActionShowMenu() -> void override;
60 auto render() const -> void override;
61
62#pragma endregion
63
64#pragma region TranslateAction_functions
65
66 auto setIsWorld(bool newState) -> void;
67
68#pragma endregion
69
70private:
71
72#pragma region member_variables
73
75
78
79 bool isWorldPoint = true;
80
81#pragma endregion
82
83#pragma region helper_functions
84
85 #pragma endregion
86
87#pragma region static_variables
88
89#pragma endregion
90
91};
A class that changes a variable over a set duration.
Vector4D Point2D
Definition Transform.h:22
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
Point2D endingPosition
Definition MoveToPointAction.h:77
auto ActionShowMenu() -> void override
Displays a window in imgui.
Definition MoveToPointAction.cpp:80
auto operator=(const MoveToPointAction &) -> MoveToPointAction &=default
auto operator=(MoveToPointAction &&other) noexcept -> MoveToPointAction &=default
Transform * objectTransform
Definition MoveToPointAction.h:74
~MoveToPointAction() override=default
Point2D startingPosition
Definition MoveToPointAction.h:76
bool isWorldPoint
Definition MoveToPointAction.h:79
MoveToPointAction(MoveToPointAction &&other) noexcept=default
MoveToPointAction(const MoveToPointAction &)=default
MoveToPointAction()=default
auto execute() -> void override
Virtual function that is called every frame to change a game object.
Definition MoveToPointAction.cpp:63
auto end() -> void override
Virtual function that is called once, when an Action is finished executing.
Definition MoveToPointAction.cpp:75
auto render() const -> void override
Function used to draw things to screen, useful for things such as debug drawing.
Definition MoveToPointAction.cpp:85
auto init() -> void override
Virtual function that is called once, when the Action is first starting up.
Definition MoveToPointAction.cpp:50
auto setIsWorld(bool newState) -> void
Definition MoveToPointAction.cpp:90
Definition Transform.h:28
Definition Bezier.h:30