did a lot of stuff holy shit

This commit is contained in:
2024-01-26 13:18:15 +01:00
parent 3ce02c2147
commit 8d237ae1d4
110 changed files with 2282 additions and 351 deletions

View File

@@ -0,0 +1,26 @@
extends Node
@onready var transition: CanvasLayer = $Transition
@export var levels: Array[PackedScene]
var level_pointer: int = 0
const PROGRESS_SAVE_PATH: String = "user://save.cfg"
var progress_save: ConfigFile = ConfigFile.new()
func _ready() -> void:
progress_save.load(PROGRESS_SAVE_PATH)
func next_level() -> void:
level_pointer += 1
if level_pointer < levels.size():
transition.show()
await get_tree().create_timer(1).timeout
get_tree().change_scene_to_packed(levels[level_pointer])
await get_tree().create_timer(2).timeout
transition.hide()
else:
get_tree().change_scene_to_file("res://scenes/gui/menus/game_finished.tscn")
func start_last_level() -> void:
pass