void Eat(Collider2D collision) { var points = collision.GetComponent <PointObject>().GetPoints(); snake.AddLength(points); Destroy(collision.gameObject); }
void Eat(Collider2D collision) { var points = collision.GetComponent <PointObject>().GetPoints(); snake.AddLength(points); Destroy(collision.gameObject); }