Brunot
Loading...
Searching...
No Matches
MainMenuScene.h
Go to the documentation of this file.
1
11// ____ __ __ __
12// /\__ _\/\ \ /\ \/\ \
13// \/_/\ \/\ \ \___ __ \ \ \_\ \ ___ __ __ ____ __
14// \ \ \ \ \ _ `\ /'__`\ \ \ _ \ / __`\/\ \/\ \ /',__\ /'__`\
15// \ \ \ \ \ \ \ \/\ __/ \ \ \ \ \/\ \L\ \ \ \_\ \/\__, `\/\ __/
16// \ \_\ \ \_\ \_\ \____\ \ \_\ \_\ \____/\ \____/\/\____/\ \____\
17// \/_/ \/_/\/_/\/____/ \/_/\/_/\/___/ \/___/ \/___/ \/____/
18
19#pragma once
20#include "Framework/Component.h"
21
23{
24public:
25#pragma region static_functions
26
27#pragma endregion
28
31 auto operator=(const MainMenuScene&) -> MainMenuScene& = default;
32 ~MainMenuScene() override = default;
33 MainMenuScene(MainMenuScene&& other) noexcept;
34 auto operator=(MainMenuScene&& other) noexcept -> MainMenuScene& = default;
35
36#pragma region overriden_functions
37
38 auto clone() const -> std::unique_ptr<GameObject> override
39 {
40 return std::make_unique<MainMenuScene>(*this);
41 }
42
43 auto componentShowMenu() -> void override
44 {
45 } // for debug ImGUI
46 auto onUpdate(float dt) -> void override;
47
48 auto endWindow() -> void override
49 {
50 } // for debug ImGUI
51 auto onRender() -> void override;
52 auto onEnterEngine() -> void override;
53 auto load(Stream& stream) -> void override;
54 auto save(Stream& stream) const -> void override;
55
56 friend auto to_json(json& j, const MainMenuScene& n) -> void;
57 friend auto from_json(const json& j, MainMenuScene& n) -> void;
58
59
60#pragma endregion
61
62#pragma region MainMenuScene_functions
63
64#pragma endregion
65
66#pragma region messaging_functions
67 auto linkMessages() -> void;
68
69 auto startButtonPressed(const Message* message) -> Message;
70 auto creditsButtonPressed(const Message* message) -> Message;
71 auto optionsButtonPressed(const Message* message) -> Message;
72 auto howToPlayButtonPressed(const Message* message) -> Message;
73 auto quitButtonPressed(const Message* message) -> Message;
74
75
76#pragma endregion
77
78private:
79#pragma region member_variables
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};
sys::Json Stream
Definition AudioObject.h:20
The base class for components, holding all of their shared All components should inherit from this.
nlohmann::json json
Definition Json.cpp:19
Component(ComponentTypeEnum type, const char *typeName)
Definition Component.cpp:72
GameObject(std::string typeName, gobj::Type parentType, gobj::Type type)
constructor for gameobject.
Definition GameObject.cpp:23
Definition MainMenuScene.h:23
friend auto from_json(const json &j, MainMenuScene &n) -> void
Definition MainMenuScene.cpp:90
~MainMenuScene() override=default
auto quitButtonPressed(const Message *message) -> Message
Definition MainMenuScene.cpp:166
auto onEnterEngine() -> void override
hook that is called when a GameObject enters the Engine tree.
Definition MainMenuScene.cpp:64
auto optionsButtonPressed(const Message *message) -> Message
Definition MainMenuScene.cpp:150
auto onRender() -> void override
called every frame after update has been called for every object.
Definition MainMenuScene.cpp:60
friend auto to_json(json &j, const MainMenuScene &n) -> void
Definition MainMenuScene.cpp:83
auto creditsButtonPressed(const Message *message) -> Message
Definition MainMenuScene.cpp:142
auto save(Stream &stream) const -> void override
Implementations will load the state of a GameObject to a th::Json object.
Definition MainMenuScene.cpp:78
auto componentShowMenu() -> void override
Definition MainMenuScene.h:43
auto operator=(const MainMenuScene &) -> MainMenuScene &=default
auto howToPlayButtonPressed(const Message *message) -> Message
Definition MainMenuScene.cpp:158
auto onUpdate(float dt) -> void override
called once every frame.
Definition MainMenuScene.cpp:55
auto load(Stream &stream) -> void override
Implementations will load the state of a GameObject from a th::Json Object.
Definition MainMenuScene.cpp:73
auto startButtonPressed(const Message *message) -> Message
Definition MainMenuScene.cpp:135
auto operator=(MainMenuScene &&other) noexcept -> MainMenuScene &=default
auto clone() const -> std::unique_ptr< GameObject > override
makes a copy a GameObject even if it's held polymorphically
Definition MainMenuScene.h:38
auto linkMessages() -> void
Definition MainMenuScene.cpp:98
auto endWindow() -> void override
currently unused, but intended to but was assumed to be necessary for a proper ImGui editor
Definition MainMenuScene.h:48
MainMenuScene()
Definition MainMenuScene.cpp:34
Definition Message.h:34