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
216 B
GDScript

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