30#pragma region static_functions
41#pragma region overriden_functions
45 return std::make_unique<PlayerJoinScene>(*
this);
49 auto onUpdate(
float dt) ->
void override;
56 auto load(
const Stream& stream) ->
void override;
57 auto save(
Stream& stream)
const ->
void override;
65#pragma region PlayerJoinScene_functions
69#pragma region messaging_functions
92#pragma region member_variables
106#pragma region helper_functions
113#pragma region static_variables
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
A derived version of selector that only selects from Input if the inputtingDeviceID matches a value i...
Definition FilteredSelector.h:33
GameObject(std::string typeName, gobj::Type parentType, gobj::Type type)
constructor for gameobject.
Definition GameObject.cpp:23
Component that handles players connecting / disconnecting input devices in the "connect controllers" ...
Definition PlayerJoinScene.h:28
std::vector< int > availablePlayerSlots
Vector used to see what slots for players to join.
Definition PlayerJoinScene.h:95
FilteredSelector * gameplayButtonSelector
The invisible selector that sits on the button to go to the gameplay scene. Cached so we don't need t...
Definition PlayerJoinScene.h:101
auto linkMessages() -> void
Definition PlayerJoinScene.cpp:160
auto onEnterEngine() -> void override
hook that is called when a GameObject enters the Engine tree.
Definition PlayerJoinScene.cpp:121
auto receiveSelectClicked(const Message *message) -> Message
Joins the Mouse to the game.
Definition PlayerJoinScene.cpp:202
auto GoToGameplayButtonPressed(const Message *message) -> Message
Takes the player to the gameplay scene.
Definition PlayerJoinScene.cpp:248
auto onUpdate(float dt) -> void override
called once every frame.
Definition PlayerJoinScene.cpp:112
friend auto to_json(json &j, const PlayerJoinScene &n) -> void
Definition PlayerJoinScene.cpp:145
auto save(Stream &stream) const -> void override
Implementations will load the state of a GameObject to a th::Json object.
Definition PlayerJoinScene.cpp:140
auto receiveSelectPressed(const Message *message) -> Message
Joins Keys/Controllers to the game.
Definition PlayerJoinScene.cpp:197
auto load(const Stream &stream) -> void override
Implementations will load the state of a GameObject from a th::Json Object.
Definition PlayerJoinScene.cpp:135
PlayerJoinScene()
Definition PlayerJoinScene.cpp:42
friend auto from_json(const json &j, PlayerJoinScene &n) -> void
Definition PlayerJoinScene.cpp:152
auto receiveDeselect(const Message *message) -> Message
Removes whoever deselected from the game.
Definition PlayerJoinScene.cpp:207
~PlayerJoinScene() override=default
auto attemptToAddPlayer(const Message *message) -> Message
Helper function so we don't have to copy-paste code between receiveSelectPressed and receiveSelectCli...
Definition PlayerJoinScene.cpp:282
auto componentShowMenu() -> void override
Definition PlayerJoinScene.cpp:63
auto operator=(PlayerJoinScene &&other) noexcept -> PlayerJoinScene &=default
std::vector< int > currentPlayers
Vector used to track the order of when inputting devices join.
Definition PlayerJoinScene.h:98
auto clone() const -> std::unique_ptr< GameObject > override
makes a copy a GameObject even if it's held polymorphically
Definition PlayerJoinScene.h:43
auto onRender() -> void override
called every frame after update has been called for every object.
Definition PlayerJoinScene.cpp:117
auto receivePauseKeyPressed(const Message *message) -> Message
Takes the player back to Main Menu.
Definition PlayerJoinScene.cpp:275
auto endWindow() -> void override
currently unused, but intended to but was assumed to be necessary for a proper ImGui editor
Definition PlayerJoinScene.h:51
auto operator=(const PlayerJoinScene &) -> PlayerJoinScene &=default