Пример #1
0
    public void DoTurn()
    {
        if (BuildingJob != null)
        {
            currentProduction = PRODUCTION.BUSY;
        }

        if (currentProduction == PRODUCTION.BUSY)
        {
            workLeft = BuildingJob.DoWork(productionPerTurn);
        }
    }
Пример #2
0
 public void DoTurn()
 {
     if (buildingJob != null)
     {
         float workLeft = buildingJob.DoWork(productionPerTurn);
         if (workLeft <= 0)
         {
             // Job is complete
             buildingJob = null;
             // TODO: Save overflow
         }
     }
 }