private void Start() { taskSystem = new CM_TaskSystem <Task>(); transporterTaskSystem = new CM_TaskSystem <TransporterTask>(); CM_IWorker worker = null;// CM_Worker.Create(new Vector3(450, 500)); CM_WorkerTaskAI workerTaskAI = worker.GetGameObject().AddComponent <CM_WorkerTaskAI>(); workerTaskAI.Setup(worker, taskSystem); worker = null;// CM_Worker.Create(new Vector3(550, 500)); CM_WorkerTransporterTaskAI workerTransporterTaskAI = worker.GetGameObject().AddComponent <CM_WorkerTransporterTaskAI>(); workerTransporterTaskAI.Setup(worker, transporterTaskSystem); weaponSlotList = new List <WeaponSlot>(); GameObject weaponSlotGameObject = SpawnWeaponSlot(new Vector3(500, 500)); weaponSlotList.Add(new WeaponSlot(weaponSlotGameObject.transform)); weaponSlotGameObject = SpawnWeaponSlot(new Vector3(500, 490)); weaponSlotList.Add(new WeaponSlot(weaponSlotGameObject.transform)); weaponSlotGameObject = SpawnWeaponSlot(new Vector3(500, 510)); weaponSlotList.Add(new WeaponSlot(weaponSlotGameObject.transform)); }
public void Setup(CM_IWorker worker, CM_TaskSystem <CM_GameHandler.Task> taskSystem) { this.worker = worker; this.taskSystem = taskSystem; state = State.WaitingForNextTask; }