you can now have as MANY checkpoints as you want, in as many rooms as you want!

This commit is contained in:
JHDev2006
2025-09-25 09:29:00 +01:00
parent d058425c13
commit 8126439a81
8 changed files with 21 additions and 12 deletions

View File

@@ -160,7 +160,7 @@ func _physics_process(delta: float) -> void:
elif current_state == EditorState.TILE_MENU:
close_tile_menu()
if Input.is_action_just_pressed("editor_play") and (current_state == EditorState.IDLE or current_state == EditorState.PLAYTESTING) and Global.current_game_mode == Global.GameMode.LEVEL_EDITOR:
Checkpoint.passed = false
Checkpoint.passed_checkpoints.clear()
if current_state == EditorState.PLAYTESTING:
stop_testing()
else:

View File

@@ -10,7 +10,7 @@ func _ready() -> void:
owner.queue_free()
return
owner.show()
if Checkpoint.passed:
if owner.passed:
sprite.hide()
activated.show()

View File

@@ -159,7 +159,7 @@ func transition_to_next_level() -> void:
first_load = true
SaveManager.write_save()
Global.transition_to_scene("res://Scenes/Levels/LevelTransition.tscn")
Checkpoint.passed = false
Checkpoint.passed_checkpoints.clear()
func reload_level() -> void:
LevelTransition.level_to_transition_to = Level.start_level_path

View File

@@ -263,7 +263,7 @@ func activate_p_switch() -> void:
func reset_values() -> void:
PlayerGhost.idx = 0
Checkpoint.passed = false
Checkpoint.passed_checkpoints.clear()
Checkpoint.sublevel_id = 0
Door.unlocked_doors = []
Checkpoint.unlocked_doors = []