void Ready() { for (int i = 0; i < pooledObjects.Count; i++) { Misile m = (Misile)pooledObjects[i]; m.GetInPosition(setupPositions[i] + transform.position); m.Aim(GameController.GC.Player.position); } }
void Aim() { int arriveCount = 0; for (int i = 0; i < pooledObjects.Count; i++) { Misile m = (Misile)pooledObjects[i]; m.GetInPosition(setupPositions[i] + transform.position); if (m.InPosition) { arriveCount++; m.Aim(GameController.GC.Player.position); } } if (arriveCount >= pooledObjects.Count) { StartCoroutine(ReadyTimer()); } }