fixed level loading and starting to setup proper gyms, zoos and playtest levels
All checks were successful
All checks were successful
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user