Exemple #1
0
 public void RefreshUI()
 {
     buildButton.interactable  = false;
     repairButton.interactable = false;
     sellButton.interactable   = false;
     if (!building.currentTask)
     {
         if (building.buildTaskPrefab && BuildTask.TaskAvailable(building))
         {
             buildButton.interactable = true;
         }
         if (building.repairTaskPrefab && RepairTask.TaskAvailable(building))
         {
             repairButton.interactable = true;
         }
         if (building.deconstructTaskPrefab && DeconstructTask.TaskAvailable(building))
         {
             sellButton.interactable = true;
         }
     }
 }