menu and level select ready
This commit is contained in:
parent
311c0395ab
commit
f470efbe1f
10 changed files with 61 additions and 11 deletions
|
|
@ -1,8 +1,8 @@
|
|||
extends Node
|
||||
|
||||
@export var levels : Array[String] = [
|
||||
""
|
||||
]
|
||||
@export var levels : Array[LevelRes]
|
||||
@export var menu_scene_path : String
|
||||
@export var sandbox_scene_path : String
|
||||
var current_level = 0
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
|
|
@ -16,7 +16,8 @@ func _process(delta):
|
|||
|
||||
func load_next_level():
|
||||
if current_level+1 < levels.size():
|
||||
get_tree().change_scene_to_file(levels[current_level+1])
|
||||
get_tree().change_scene_to_file(levels[current_level+1].level_path)
|
||||
else:
|
||||
#ending screen
|
||||
print("end of game reached!")
|
||||
get_tree().change_scene_to_file(menu_scene_path)
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue