_EagleOwle_

Coroutine Wait Time

Jun 24th, 2021
434
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. IEnumerator WaitCoroutine(float time)
  2.     {
  3.         yield return new WaitForSeconds(time);
  4.  
  5.         towers = GameObject.FindObjectsOfType<Tower>();
  6.         towers.OrderBy((d) => (d.transform.position - transform.position).sqrMagnitude).ToArray();
  7.  
  8.         StartCoroutine(WaitCoroutine(time));
  9.  
  10.     }
RAW Paste Data