Added Death Counter to Custom Levels + Fixed castle bridge axe bonus sprites

This commit is contained in:
JHDev2006
2025-10-01 10:58:20 +01:00
parent fa4c1c711c
commit 51d81844d0
11 changed files with 308 additions and 267 deletions

View File

@@ -560,6 +560,7 @@ func die(pit := false) -> void:
Global.p_switch_active = false
Global.p_switch_timer = 0
stop_all_timers()
Global.total_deaths += 1
sprite.process_mode = Node.PROCESS_MODE_ALWAYS
state_machine.transition_to("Dead", {"Pit": pit})
process_mode = Node.PROCESS_MODE_ALWAYS
@@ -584,7 +585,7 @@ func death_load() -> void:
Global.death_load = true
# Handle lives decrement for CAMPAIGN and MARATHON
if [Global.GameMode.CAMPAIGN, Global.GameMode.MARATHON].has(Global.current_game_mode):
if [Global.GameMode.CAMPAIGN, Global.GameMode.MARATHON, Global.GameMode.LEVEL_EDITOR, Global.GameMode.CUSTOM_LEVEL].has(Global.current_game_mode):
if Settings.file.difficulty.inf_lives == 0:
Global.lives -= 1

View File

@@ -62,6 +62,8 @@ var debugged_in := true
var score_tween = create_tween()
var time_tween = create_tween()
var total_deaths := 0
var score := 0:
set(value):
if disco_mode == true:
@@ -304,6 +306,7 @@ func reset_values() -> void:
PlayerGhost.idx = 0
Checkpoint.passed_checkpoints.clear()
Checkpoint.sublevel_id = 0
Global.total_deaths = 0
Door.unlocked_doors = []
Checkpoint.unlocked_doors = []
KeyItem.total_collected = 0