fixed level loading and starting to setup proper gyms, zoos and playtest levels
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 23s
Create tag and build when new code gets to main / Test (push) Successful in 8m23s
Create tag and build when new code gets to main / Export (push) Successful in 10m40s

This commit is contained in:
2026-02-03 16:31:37 +01:00
parent 8a3faff7d0
commit 0e412c2a42
53 changed files with 1122 additions and 22 deletions

View File

@@ -1,4 +1,5 @@
extends Control
class_name LevelSelectMenu
## Loads a simple ItemList node within a margin container. SceneLister updates
## the available scenes in the directory provided. Activating a level will update
@@ -29,5 +30,5 @@ func add_levels_to_container() -> void:
level_buttons_container.add_item(button_name)
func _on_level_buttons_container_item_activated(index: int) -> void:
GameState.set_current_level(index)
level_selected.emit()
var level_to_load = scene_lister.files.get(index)
SceneLoader.load_scene(level_to_load)

View File

@@ -43,7 +43,7 @@ item_0/text = "1 - ExampleLevel"
[node name="SceneLister" type="Node" parent="." unique_id=149935027]
script = ExtResource("3_stdqw")
files = Array[String](["res://maps/level1.tscn", "res://maps/city.tscn", "res://maps/GYMs/enemies.tscn", "res://maps/GYMs/metrics.tscn"])
directory = "res://menus/scenes/game_scene/levels"
files = Array[String](["res://maps/level1.tscn", "res://maps/city.tscn", "res://maps/GYMs/metrics.tscn"])
directory = "res://maps"
[connection signal="item_activated" from="Control/LevelButtonsContainer" to="." method="_on_level_buttons_container_item_activated"]