From 73d386dee76c4b89d97755941f98edd522c8d54b Mon Sep 17 00:00:00 2001 From: Sara Date: Thu, 30 May 2024 15:28:03 +0200 Subject: [PATCH] 2024-05-30 15:28 --- html/classutils_1_1GameRoot3D.html | 14 ++++++++----- html/game__root_8hpp_source.html | 32 +++++++++++++++--------------- 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/html/classutils_1_1GameRoot3D.html b/html/classutils_1_1GameRoot3D.html index cb2360a..76ea160 100644 --- a/html/classutils_1_1GameRoot3D.html +++ b/html/classutils_1_1GameRoot3D.html @@ -549,7 +549,8 @@ gd::Vector< SpawnPoint3D

Current active gamemode.

-

Replaced when a level is loaded that references a different game mode. *get_game_mode()

+

Replaced when a level is loaded that references a different game mode.

+

*get_game_mode()

@@ -574,7 +575,8 @@ gd::Vector<
SpawnPoint3D

Active game state.

-

Will be assigned loaded save data, or game_state_prototype if no save data is found. get_game_mode()

+

Will be assigned loaded save data, or game_state_prototype if no save data is found.

+

get_game_mode()

@@ -599,7 +601,8 @@ gd::Vector< SpawnPoint3D

The default game state data.

-

Duplicated and assigned to game_state if no save data is available. get_game_state_prototype() set_game_state_prototype(value)

+

Duplicated and assigned to game_state if no save data is available.

+

get_game_state_prototype() set_game_state_prototype(value)

@@ -624,7 +627,8 @@ gd::Vector<
SpawnPoint3D

All currently active levels.

-

Each identified by their resource paths. &get_levels()

+

Each identified by their resource paths.

+

&get_levels()

@@ -674,7 +678,7 @@ gd::Vector< SpawnPoint3D

All players by id by input device.

-

get_players() to get a vector of the IPlayer instances.

+

get_players()

diff --git a/html/game__root_8hpp_source.html b/html/game__root_8hpp_source.html index 3d7b0fd..428ff51 100644 --- a/html/game__root_8hpp_source.html +++ b/html/game__root_8hpp_source.html @@ -188,21 +188,21 @@ $(document).ready(function(){initNavTree('game__root_8hpp_source.html',''); init
135 uint32_t next_player_id{1};
140 gd::HashMap<uint32_t, gd::Pair<PlayerInput*, IPlayer*>> players{};
145 gd::RandomNumberGenerator rng{};
-
151 gd::HashMap<gd::StringName, Level3D*> levels{};
-
154 gd::Vector<SpawnPoint3D*> spawn_points{};
-
160 GameMode *game_mode{};
-
166 gd::Ref<GameState> game_state{};
-
171 gd::Ref<gd::PackedScene> first_boot_level{};
-
177 gd::Ref<GameState> game_state_prototype{};
-
178};
-
179}
-
180
-
181#endif // !UTILS_GAME_ROOT_HPP
+
152 gd::HashMap<gd::StringName, Level3D*> levels{};
+
155 gd::Vector<SpawnPoint3D*> spawn_points{};
+
162 GameMode *game_mode{};
+
169 gd::Ref<GameState> game_state{};
+
174 gd::Ref<gd::PackedScene> first_boot_level{};
+
181 gd::Ref<GameState> game_state_prototype{};
+
182};
+
183}
+
184
+
185#endif // !UTILS_GAME_ROOT_HPP
Stores session-relevant data.
Definition game_mode.hpp:16
The root of a game.
Definition game_root.hpp:28
void grab_singleton()
Attempt to make 'this' the current singleton instance.
Definition game_root.cpp:257
GameState * get_game_state() const
Get the current active game state.
Definition game_root.cpp:207
-
gd::Vector< SpawnPoint3D * > spawn_points
All currently available spawn points.
Definition game_root.hpp:154
+
gd::Vector< SpawnPoint3D * > spawn_points
All currently available spawn points.
Definition game_root.hpp:155
static bool has_singleton()
returns true if there is currently a singleton active for GameRoot
Definition game_root.cpp:35
void register_spawn_point(SpawnPoint3D *spawn_point)
Register a spawnpoint for use when spawning players.
Definition game_root.cpp:148
IPlayer * get_player(uint32_t id)
Get the player instance associated with id.
Definition game_root.cpp:215
@@ -210,9 +210,9 @@ $(document).ready(function(){initNavTree('game__root_8hpp_source.html',''); init
void unload_all_levels()
Unload all currently loaded levels.
Definition game_root.cpp:135
void replace_levels(gd::Ref< gd::PackedScene > level)
Replace all currently loaded levels with a new level.
Definition game_root.cpp:143
gd::RandomNumberGenerator rng
Global random number generator.
Definition game_root.hpp:145
-
GameMode * game_mode
Current active gamemode.
Definition game_root.hpp:160
+
GameMode * game_mode
Current active gamemode.
Definition game_root.hpp:162
static bool is_valid_level(gd::Ref< gd::PackedScene > &level)
Check if a scene is a valid level.
Definition game_root.cpp:307
-
gd::HashMap< gd::StringName, Level3D * > levels
All currently active levels.
Definition game_root.hpp:151
+
gd::HashMap< gd::StringName, Level3D * > levels
All currently active levels.
Definition game_root.hpp:152
void player_input_connected()
Instantiate a new PlayerInput.
Definition game_root.cpp:53
bool initialize_player(IPlayer *player, uint32_t id)
Initialize and register a player instance.
Definition game_root.cpp:84
GameMode * get_game_mode() const
get the current active game mode.
Definition game_root.cpp:203
@@ -220,18 +220,18 @@ $(document).ready(function(){initNavTree('game__root_8hpp_source.html',''); init
void set_game_mode(gd::Ref< gd::PackedScene > prototype)
Override the current gamemode.
Definition game_root.cpp:177
gd::HashMap< gd::StringName, Level3D * > & get_levels()
Returns all currently active levels.
Definition game_root.cpp:211
uint32_t find_empty_player_slot() const
Find a Player Input device not yet associated with a player.
Definition game_root.cpp:274
-
gd::Ref< gd::PackedScene > first_boot_level
The level to boot into on startup.
Definition game_root.hpp:171
+
gd::Ref< gd::PackedScene > first_boot_level
The level to boot into on startup.
Definition game_root.hpp:174
Level3D * load_level(gd::Ref< gd::PackedScene > level)
shorthand for load_level(level, Transform3D())
Definition game_root.cpp:102
gd::HashMap< uint32_t, gd::Pair< PlayerInput *, IPlayer * > > players
All players by id by input device.
Definition game_root.hpp:140
static GameRoot3D * get_singleton()
get the current active singleton instance of GameRoot
Definition game_root.cpp:31
Level3D * load_level_at(gd::Ref< gd::PackedScene > level, gd::Transform3D at)
Load a level, only works if 'level' is a valid scene where the root Node can cast to 'Level3D'.
Definition game_root.cpp:106
-
gd::Ref< GameState > game_state_prototype
The default game state data.
Definition game_root.hpp:177
+
gd::Ref< GameState > game_state_prototype
The default game state data.
Definition game_root.hpp:181
void release_singleton()
Attempt to stop being the active singleton instance.
Definition game_root.cpp:266
void reset_game_mode()
Un-set game mode.
Definition game_root.cpp:98
gd::Vector< IPlayer * > get_players()
Get all players in a list.
Definition game_root.cpp:219
void level_unloaded(gd::StringName scene_path)
Callback for a level exiting the tree.
Definition game_root.cpp:303
uint32_t next_player_id
Next available player ID.
Definition game_root.hpp:135
-
gd::Ref< GameState > game_state
Active game state.
Definition game_root.hpp:166
+
gd::Ref< GameState > game_state
Active game state.
Definition game_root.hpp:169
Parent class for saved game state.
Definition game_state.hpp:11
Interface required for player nodes.
Definition player.hpp:19
3D level root to be used with GameRoot3D.
Definition level.hpp:14