private void ExecuteTask_MoveToPosition(CM_GameHandler.Task.MoveToPosition moveToPositionTask) { // Move Worker to target position CMDebug.TextPopup("ExecuteTask_MoveToPosition", worker.GetPosition()); worker.MoveTo(moveToPositionTask.targetPosition, () => { state = State.WaitingForNextTask; }); }
private void ExecuteTask_TakeWeaponFromSlotToPosition(CM_GameHandler.TransporterTask.TakeWeaponFromSlotToPosition takeWeaponFromSlotToPositionTask) { worker.MoveTo(takeWeaponFromSlotToPositionTask.weaponSlotPosition, () => { takeWeaponFromSlotToPositionTask.grabWeapon(this); worker.MoveTo(takeWeaponFromSlotToPositionTask.targetPosition, () => { takeWeaponFromSlotToPositionTask.dropWeapon(); state = State.WaitingForNextTask; }); }); }