public void AddFactoryTask(FactoryUIData taskData) { FactoryBuildTask newFactoryTask = new FactoryBuildTask(taskData); newFactoryTask.allocatedColonists = new List <Colonist>(); for (int i = 0; i < taskData.colonistAssignedCount; i++) { Colonist idleColonist = GameController.Instance.colonistController.GetIdleColonist(); GameController.Instance.colonistController.AllocateColonistToTask(idleColonist, newFactoryTask); } factoryData.currentBuildTasks.Add(newFactoryTask); }
public FactoryBuildTask(FactoryUIData taskData) { buildItem = taskData.selectedItem; itemBuildAmount = taskData.buildCount; buildItem.currentUpgrade = taskData.selectedUpgrade; }