feat: added get_levels to game root
This commit is contained in:
		
							parent
							
								
									51f18f45b8
								
							
						
					
					
						commit
						dff7631816
					
				| 
						 | 
					@ -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);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue