feat(wiring): MobSpawner integration + take_damage API on dolphin

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Floppyrj45
2026-04-19 17:18:31 +02:00
parent 37e66a1350
commit 0c309405a7
3 changed files with 22 additions and 0 deletions

View File

@@ -250,6 +250,13 @@ func _raycast(reach: float) -> Dictionary:
return result
func take_damage(amount: float) -> void:
health = max(0.0, health - amount)
emit_signal("stats_changed", oxygen, health, hunger)
if health <= 0.0:
emit_signal("player_died")
func _trigger_echolocation() -> void:
if is_echolocating:
return