Brunot
Loading...
Searching...
No Matches
Splash Screen Scene.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
22struct Message;
23
25{
26public:
27#pragma region static_functions
28 static auto bindLuaTypes(sol::state& lua) -> void {}
29 static auto getEnum() -> ComponentTypeEnum
30 {
31 return cSplashScreenScene;
32 }
33
34#pragma endregion
35
38 auto operator=(const SplashScreenScene&) -> SplashScreenScene& = default;
39 ~SplashScreenScene() override = default;
40 SplashScreenScene(SplashScreenScene&& other) noexcept;
41 auto operator=(SplashScreenScene&& other) noexcept -> SplashScreenScene& = default;
42
43#pragma region overriden_functions
44
45 auto clone() const -> std::unique_ptr<GameObject> override
46 {
47 return std::make_unique<SplashScreenScene>(*this);
48 }
49
50 auto componentShowMenu() -> void override
51 {
52 } // for debug ImGUI
53 auto onUpdate(float dt) -> void override;
54
55 auto endWindow() -> void override
56 {
57 } // for debug ImGUI
58 auto onRender() -> void override;
59 auto onEnterEngine() -> void override;
60 auto load(const Stream& stream) -> void override;
61 auto save(Stream& stream) const -> void override;
62
63 friend auto to_json(json& j, const SplashScreenScene& n) -> void;
64 friend auto from_json(const json& j, SplashScreenScene& n) -> void;
65
66
67#pragma endregion
68
69#pragma region SplashScreenScene_functions
70
71#pragma endregion
72
73#pragma region messaging_functions
74
76 auto linkMessages() -> void;
77 auto receiveSkipButtonPressed(const Message* message) -> Message;
78 auto receivePauseKeyPressed(const Message* message) -> Message;
79
80 auto playerCountSceneButton1Pressed(const Message* message) -> Message;
81 auto playerCountSceneButton2Pressed(const Message* message) -> Message;
82 auto playerCountSceneButton3Pressed(const Message* message) -> Message;
83 auto playerCountSceneButton4Pressed(const Message* message) -> Message;
84
85
86#pragma endregion
87
88private:
89#pragma region member_variables
90
92
93#pragma endregion
94
95#pragma region helper_functions
96
97 auto loadMainMenu() const -> void;
98
99#pragma endregion
100
101#pragma region static_variables
102
103#pragma endregion
104
105};
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
ComponentTypeEnum
This enum lists out every type of component we have.
Definition Component.h:39
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:24
Definition Splash Screen Scene.h:25
auto loadMainMenu() const -> void
Definition Splash Screen Scene.cpp:231
auto receivePauseKeyPressed(const Message *message) -> Message
Definition Splash Screen Scene.cpp:181
static auto getEnum() -> ComponentTypeEnum
Definition Splash Screen Scene.h:29
auto onRender() -> void override
called every frame after update has been called for every object.
Definition Splash Screen Scene.cpp:59
auto save(Stream &stream) const -> void override
Implementations will load the state of a GameObject to a th::Json object.
Definition Splash Screen Scene.cpp:108
auto onEnterEngine() -> void override
hook that is called when a GameObject enters the Engine tree.
Definition Splash Screen Scene.cpp:63
auto operator=(SplashScreenScene &&other) noexcept -> SplashScreenScene &=default
auto linkMessages() -> void
Resets the table to prepare it for a new game.
Definition Splash Screen Scene.cpp:130
auto clone() const -> std::unique_ptr< GameObject > override
makes a copy a GameObject even if it's held polymorphically
Definition Splash Screen Scene.h:45
auto componentShowMenu() -> void override
Definition Splash Screen Scene.h:50
auto load(const Stream &stream) -> void override
Implementations will load the state of a GameObject from a th::Json Object.
Definition Splash Screen Scene.cpp:103
auto endWindow() -> void override
currently unused, but intended to but was assumed to be necessary for a proper ImGui editor
Definition Splash Screen Scene.h:55
static auto bindLuaTypes(sol::state &lua) -> void
Definition Splash Screen Scene.h:28
~SplashScreenScene() override=default
auto playerCountSceneButton1Pressed(const Message *message) -> Message
Definition Splash Screen Scene.cpp:187
auto playerCountSceneButton4Pressed(const Message *message) -> Message
Definition Splash Screen Scene.cpp:220
friend auto from_json(const json &j, SplashScreenScene &n) -> void
Definition Splash Screen Scene.cpp:120
friend auto to_json(json &j, const SplashScreenScene &n) -> void
Definition Splash Screen Scene.cpp:113
auto playerCountSceneButton3Pressed(const Message *message) -> Message
Definition Splash Screen Scene.cpp:209
auto playerCountSceneButton2Pressed(const Message *message) -> Message
Definition Splash Screen Scene.cpp:198
float splashScreenTimer
Definition Splash Screen Scene.h:91
auto receiveSkipButtonPressed(const Message *message) -> Message
Definition Splash Screen Scene.cpp:174
SplashScreenScene()
Definition Splash Screen Scene.cpp:33
auto onUpdate(float dt) -> void override
called once every frame.
Definition Splash Screen Scene.cpp:54
auto operator=(const SplashScreenScene &) -> SplashScreenScene &=default
Definition Message.h:35