Refactor health management and collectable cleanup logic for improved functionality

This commit is contained in:
2025-05-29 01:19:18 +02:00
parent a098155b0f
commit 9b6a4f38bd
4 changed files with 33 additions and 54 deletions

View File

@@ -12,7 +12,8 @@ func _ready():
coin.collected.connect(on_collected)
func on_collected(amount: int, type: CollectableResource.CollectableType) -> void:
func on_collected(amount: int, type: CollectableResource.CollectableType, _body: Node2D) -> void:
if not game_manager:
return
if type != CollectableResource.CollectableType.COIN: