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.

10 lines
213 B
GDScript

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