Ejemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     if (bossManager != null)             //Update all of our script that need to be updated.
     {
         bossManager.OnUpdate();
     }
     if (gameManager != null)
     {
         gameManager.OnUpdate();
     }
     if (playercontroller != null)
     {
         playercontroller.OnUpdate();
     }
     if (openDoor != null)
     {
         openDoor.OnUpdate();
     }
     foreach (Unit unit in units)
     {
         if (unit != null)
         {
             unit.OnUpdate();
         }
     }
 }