You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9 lines
212 B
GDScript

extends RigidBody2D
signal ccVanCollected()
func _on_play_area_body_exited(body):
if body.get_parent() == $"../../Cupcakes" and body.name.find("Van") != -1:
emit_signal("ccVanCollected")
body.queue_free()