bonkjj st!

This commit is contained in:
Haze Weathers 2025-11-01 21:25:33 -06:00
parent dd66cc2a84
commit 7d20cb9bcc
4 changed files with 38 additions and 6 deletions

View file

@ -16,3 +16,8 @@ func _physics_process(delta: float) -> void:
velocity += global_position.direction_to(player.global_position) * force * delta
velocity -= velocity * damping * delta
move_and_slide()
func _on_hitbox_body_entered(body: Node2D) -> void:
if body.has_method(&"knock"):
body.knock(global_position.direction_to(body.global_position) * velocity.length())