11 lines
265 B
GDScript
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()
|