Tweaked floaty area

This commit is contained in:
2026-02-08 20:59:30 +11:00
parent ab0f5efa30
commit 29ff9b1349
2 changed files with 35 additions and 25 deletions

View File

@@ -3,8 +3,8 @@ extends Area2D
func _on_body_entered(body) -> void:
#print("collision")
if body is BoxBoy:
body.enable_float()
body.set_floaty_height(position.y + $CollisionShape2D.shape.get_rect().position.y)
func _on_body_exited(body) -> void:
if body is BoxBoy:
body.disable_float()
body.clear_floaty_height()