public void FindClosest() { gos = GameObject.FindGameObjectsWithTag("Player"); gos = (GameObject[])RuntimeServices.AddArrays(typeof(GameObject), gos, GameObject.FindGameObjectsWithTag("Ally")); if (gos.Length <= 0) { return; } angry = true; GameObject gameObject = null; float num = float.PositiveInfinity; Vector3 position = transform.position; int i = 0; GameObject[] array = gos; for (int length = array.Length; i < length; i++) { float sqrMagnitude = (array[i].transform.position - position).sqrMagnitude; if (!(sqrMagnitude >= num)) { followTarget = array[i].transform; num = sqrMagnitude; } } }