Exemplo n.º 1
0
 private void BuildingSelection()
 {
     if (Input.GetKeyDown(KeyCode.Escape))
     {
         builderScript.SwitchBuilding(-1);
     }
     else if (Input.GetKeyDown(KeyCode.Alpha1))
     {
         builderScript.SwitchBuilding(0);
         playerBuilder.SelectBulding(0);
     }
     else if (Input.GetKeyDown(KeyCode.Alpha2))
     {
         builderScript.SwitchBuilding(1);
         playerBuilder.SelectBulding(1);
     }
     else if (Input.GetKeyDown(KeyCode.Alpha3))
     {
         builderScript.SwitchBuilding(2);
         playerBuilder.SelectBulding(2);
     }
     else if (Input.GetKeyDown(KeyCode.Alpha4))
     {
         builderScript.SwitchBuilding(3);
         playerBuilder.SelectBulding(3);
     }
     else if (Input.GetKeyDown(KeyCode.Alpha5))
     {
         builderScript.SwitchBuilding(4);
         playerBuilder.SelectBulding(4);
     }
     else if (Input.GetKeyDown(KeyCode.Alpha6))
     {
         builderScript.SwitchBuilding(5);
         playerBuilder.SelectBulding(5);
     }
 }