Files
colorvania/platforms/floaty.gd
2026-02-08 20:59:30 +11:00

11 lines
265 B
GDScript

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