Esempio n. 1
0
 IEnumerator FollowPath(List <Waypoint> path)
 {
     print("Starting patrol...");
     foreach (Waypoint waypoint in path)
     {
         transform.position = waypoint.transform.position;
         yield return(new WaitForSeconds(1f));
     }
     print("Ending patrol...");
     baseHealth.AtBase(DamagePerMinion);
     Destroy(gameObject);
 }