/// <summary> /// Gets the worker cost. /// </summary> public int GetWorkerCost(LogicLevel level) { int totalWorkers = level.GetWorkerManagerAt(level.GetVillageType()).GetTotalWorkers() + level.GetUnplacedObjectCount(LogicDataTables.GetWorkerData()); switch (totalWorkers) { case 1: return(this._workerCostSecondBuildCost); case 2: return(this._workerCostThirdBuildCost); case 3: return(this._workerCostFourthBuildCost); case 4: return(this._workerCostFifthBuildCost); default: return(this._workerCostFifthBuildCost); } }