class_name Ball extends RigidBody2D func die(): queue_free() func _on_VisibilityNotifier2D_screen_exited(): die()