Catcher.gd 306 B

12345678910111213141516
  1. class_name Catcher
  2. extends Area2D
  3. signal kace_catch
  4. signal game_over
  5. func _on_Catcher_body_entered(body: Node) -> void:
  6. # TODO Debug game over signal not detected
  7. if body.is_in_group("ball"):
  8. body.queue_free()
  9. emit_signal("kace_catch")
  10. elif body.is_in_group("grid"):
  11. emit_signal("game_over")