Beispiel #1
0
 private void UndoBuildingConstruction()
 {
     if (Input.GetMouseButtonDown(1))
     {
         isBuildingMoving = false;
         Destroy(buildingInstance);
         _buildData = null;
         UnitInputController.Instance.enabled = true;
     }
 }
Beispiel #2
0
 public void ConstructBuilding(PlayerInformation player, BuildingBuildData buildData)
 {
     if (_buildData)
     {
         return;
     }
     //AssignWorkerToBuilding();
     _buildData        = buildData;
     _playerToBuildFor = player;
     isBuildingMoving  = true;
 }
Beispiel #3
0
 private void DeselectBuilding()
 {
     if (!buildingInstance)
     {
         return;
     }
     if (!CanPlaceBuilding())
     {
         return;
     }
     if (Input.GetMouseButtonDown(0))
     {
         isBuildingMoving  = false;
         _buildData        = null;
         _playerToBuildFor = null;
         buildingInstance  = null;
         UnitInputController.Instance.enabled = true;
     }
 }