feat: added get_levels to game root

stripped
Sara 2024-05-21 11:57:31 +02:00
parent 51f18f45b8
commit dff7631816
2 changed files with 5 additions and 0 deletions

View File

@ -208,6 +208,10 @@ Ref<PackedScene> GameRoot3D::get_first_boot_level() const {
return this->first_boot_level; return this->first_boot_level;
} }
HashMap<StringName, Level3D *> &GameRoot3D::get_levels() {
return this->levels;
}
void GameRoot3D::grab_singleton() { void GameRoot3D::grab_singleton() {
if(GameRoot3D::has_singleton()) { if(GameRoot3D::has_singleton()) {
this->set_process_mode(PROCESS_MODE_DISABLED); this->set_process_mode(PROCESS_MODE_DISABLED);

View File

@ -65,6 +65,7 @@ public:
Ref<GameState> get_game_state() const; Ref<GameState> get_game_state() const;
void set_first_boot_level(Ref<PackedScene> level); void set_first_boot_level(Ref<PackedScene> level);
Ref<PackedScene> get_first_boot_level() const; Ref<PackedScene> get_first_boot_level() const;
HashMap<StringName, Level3D *> &get_levels();
protected: protected:
// attempt to make 'this' the current singleton instance // attempt to make 'this' the current singleton instance
void grab_singleton(); void grab_singleton();