Пример #1
0
        public void Reset(WaypointTask holdTask, WaypointTask approachTask, WaypointTask enterTask, WaypointTask closeTask, DockTask dockTask, MyTuple <IntelItemType, long> intelKey, MyGridProgram program, MyCubeSize dockSize, IMyTerminalBlock connector, IMyTerminalBlock indicator = null)
        {
            Reset();
            if (indicator != null)
            {
                Indicator = indicator;
                Connector = connector;
            }
            EnterHoldingPattern = holdTask;
            WaitForClearance    = new WaitTask();
            ApproachEntrance    = approachTask;
            ApproachDock        = enterTask;
            FinalAdjustToDock   = closeTask;
            DockTask            = dockTask;
            IntelKey            = intelKey;
            DockSize            = dockSize;
            Program             = program;

            closeTask.Destination.MaxSpeed = 0.5f;
            enterTask.Destination.MaxSpeed = 5;

            TaskQueue.Enqueue(EnterHoldingPattern);
            TaskQueue.Enqueue(WaitForClearance);
            TaskQueue.Enqueue(ApproachEntrance);
            TaskQueue.Enqueue(ApproachDock);
            TaskQueue.Enqueue(FinalAdjustToDock);
            TaskQueue.Enqueue(DockTask);
        }
Пример #2
0
//        bool cleared = false;

        public UndockSeperationTask(IAutopilot autopilotSubsystem, IDockingSubsystem dockingSubsystem, MyGridProgram program)
        {
            AutopilotSubsystem = autopilotSubsystem;
            DockingSubsystem   = dockingSubsystem;
            WaitTask           = new WaitTask();
            Program            = program;
        }