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