Esempio n. 1
0
 void UpdateTowerSelection()
 {
     if (Input.GetKeyDown(KeyCode.Alpha1) || Input.GetKeyDown(KeyCode.Keypad1))
     {
         currentTower = 0;
     }
     if (Input.GetKeyDown(KeyCode.Alpha2) || Input.GetKeyDown(KeyCode.Keypad2))
     {
         currentTower = 1;
     }
     if (Input.GetKeyDown(KeyCode.Alpha3) || Input.GetKeyDown(KeyCode.Keypad3))
     {
         currentTower = 2;
     }
     if (Input.GetKeyDown(KeyCode.Alpha4) || Input.GetKeyDown(KeyCode.Keypad4))
     {
         currentTower = 3;
     }
     if (Input.GetKeyDown(KeyCode.Alpha5) || Input.GetKeyDown(KeyCode.Keypad5))
     {
         currentTower = 4;
     }
     if (Input.GetKeyDown(KeyCode.Alpha6) || Input.GetKeyDown(KeyCode.Keypad6))
     {
         currentTower = 5;
     }
     if (currentTower > availableTowers.Count - 1)
     {
         currentTower = 0;
     }
     GUIManager.ChangeSelectedTower(currentTower);
     lastGridSquare = Pathfinder.infinityGridSquare;
     BuildPhaseGO();
 }