extends Node class_name Damageable @export var health = 3 @export var hitback_velocity: float = 500 signal got_hit func damage(value: int = 0, direction: Vector2 = Vector2.UP): health -= value get_parent().velocity = hitback_velocity * direction got_hit.emit()