Refactor scene structure and resource paths; add death and game over screens

This commit is contained in:
2025-05-10 02:33:49 +02:00
parent 04cce84c6c
commit a95d96dcc9
38 changed files with 486 additions and 88 deletions

View File

@@ -7,10 +7,6 @@ extends Node2D
@onready var gm: GM = $"/root/GameManager"
func reset_scene() -> void:
get_tree().reload_current_scene()
func _on_health_component_on_death() -> void:
if death_sfx:
death_sfx.play()
@@ -20,10 +16,6 @@ func _on_health_component_on_death() -> void:
effect.global_position = global_position
effect.scale = Vector2(1.5, 1.5)
if gm.get_lives() == 1:
gm.reset_player_state()
else:
gm.remove_lives(1)
gm.set_coins(0)
call_deferred("reset_scene")
gm.remove_lives(1)
gm.set_coins(0)