Exemple #1
0
 // Start is called before the first frame update
 void Start()
 {
     //Sets up the first unit
     currentUnit = units[unitTracker];
     //Sets the randomizer seed based on the systems milliseconds
     UnityEngine.Random.InitState(DateTime.Now.Millisecond);
 }
Exemple #2
0
 void SwitchUnit()
 {
     currentUnit = units[unitTracker];
     if (unitTracker < units.Length - 1)
     {
         unitTracker++;
     }
     else
     {
         unitTracker = 0;
     }
 }