Example #1
0
 // Update is called once per frame
 void Update()
 {
     if (Time.time > spawnMinionNext + MINION_SPAWN_RATE) {
         spawnMinionNext = Time.time + MINION_SPAWN_RATE;
         unitGameObject = (GameObject)Network.Instantiate(spawnUnit, transform.position, transform.rotation, 0);
         unitController = unitGameObject.GetComponent<MinionController>();
         unitController.SetMinionLane(minionLane);
         unitController.Initialize();
     }
 }