feat(wiring): MobSpawner integration + take_damage API on dolphin
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user