예제 #1
0
        private void PerfromBrTemplatePlanning(ActionsHolder.BarrelRollTemplateVariants template)
        {
            BarrelRollAction stubAction = new BarrelRollAction {
                HostShip = TheShip
            };

            BarrelRollPlanningSubPhase brPlanning = (BarrelRollPlanningSubPhase)Phases.StartTemporarySubPhaseNew(
                "Select position",
                typeof(BarrelRollPlanningSubPhase),
                delegate {
                FinishTractorBeamMovement(stubAction);
            }
                );

            brPlanning.Name        = "Select position";
            brPlanning.TheShip     = TheShip;
            brPlanning.IsTemporary = true;
            brPlanning.Controller  = Assigner;
            brPlanning.HostAction  = stubAction;

            brPlanning.IsTractorBeamBarrelRoll = true;
            brPlanning.SelectTemplate(template);

            Phases.UpdateHelpInfo();
            brPlanning.PerfromTemplatePlanning();
        }
예제 #2
0
        private void PerfromBrTemplatePlanning(Direction direction)
        {
            BarrelRollAction stubAction = new BarrelRollAction {
                HostShip = TheShip
            };

            BarrelRollPlanningSubPhase brPlanning = (BarrelRollPlanningSubPhase)Phases.StartTemporarySubPhaseNew(
                "Select position",
                typeof(BarrelRollPlanningSubPhase),
                delegate {
                FinishTractorBeamMovement();
            }
                );

            brPlanning.Name        = "Select position";
            brPlanning.TheShip     = TheShip;
            brPlanning.IsTemporary = true;
            brPlanning.Controller  = Assigner;
            brPlanning.HostAction  = stubAction;

            brPlanning.IsTractorBeamBarrelRoll = true;
            brPlanning.SelectTemplate(
                new ManeuverTemplate(
                    Movement.ManeuverBearing.Straight,
                    Movement.ManeuverDirection.Forward,
                    Movement.ManeuverSpeed.Speed1,
                    isSideTemplate: TheShip.ShipInfo.BaseSize != BaseSize.Small
                    ),
                direction
                );

            Phases.UpdateHelpInfo();
            brPlanning.PerfromTemplatePlanning();
        }
예제 #3
0
        private void PerfromBrTemplatePlanning(Actions.BarrelRollTemplateVariants template)
        {
            BarrelRollPlanningSubPhase brPlanning = (SubPhases.BarrelRollPlanningSubPhase)Phases.StartTemporarySubPhaseNew(
                "Select position",
                typeof(SubPhases.BarrelRollPlanningSubPhase),
                delegate {
                FinishTractorBeamMovement(new ActionsList.BarrelRollAction());
            }
                );

            brPlanning.Name                   = "Select position";
            brPlanning.TheShip                = TheShip;
            brPlanning.IsTemporary            = true;
            brPlanning.Controller             = Assigner;
            brPlanning.ObstacleOverlapAllowed = true;
            Phases.UpdateHelpInfo();
            brPlanning.SelectTemplate(template);
            brPlanning.PerfromTemplatePlanning();
        }