Пример #1
0
 public SegnorsLoopMovement(int speed, ManeuverDirection direction, ManeuverBearing bearing, MovementComplexity color) : base(speed, direction, bearing, color)
 {
     RotationEndDegrees = 180;
 }
Пример #2
0
 public TallonRollMovement(int speed, ManeuverDirection direction, ManeuverBearing bearing, MovementComplexity color) : base(speed, direction, bearing, color)
 {
 }
Пример #3
0
 public StraightBoost(int speed, ManeuverDirection direction, ManeuverBearing bearing, ManeuverColor color) : base(speed, direction, bearing, color)
 {
 }
Пример #4
0
 public BankBoost(int speed, ManeuverDirection direction, ManeuverBearing bearing, MovementComplexity color) : base(speed, direction, bearing, color)
 {
 }
Пример #5
0
        public ManeuverHolder(string parameters, Ship.GenericShip ship = null)
        {
            string[] arrParameters = parameters.Split('.');

            ManeuverSpeed speed = ManeuverSpeed.Speed1;

            switch (arrParameters[0])
            {
            case "0":
                speed = ManeuverSpeed.Speed0;
                break;

            case "1":
                speed = ManeuverSpeed.Speed1;
                break;

            case "2":
                speed = ManeuverSpeed.Speed2;
                break;

            case "3":
                speed = ManeuverSpeed.Speed3;
                break;

            case "4":
                speed = ManeuverSpeed.Speed4;
                break;

            case "5":
                speed = ManeuverSpeed.Speed5;
                break;
            }

            ManeuverDirection direction = ManeuverDirection.Forward;

            switch (arrParameters[1])
            {
            case "F":
                direction = ManeuverDirection.Forward;
                break;

            case "L":
                direction = ManeuverDirection.Left;
                break;

            case "R":
                direction = ManeuverDirection.Right;
                break;

            case "S":
                direction = ManeuverDirection.Stationary;
                break;
            }

            ManeuverBearing bearing = ManeuverBearing.Straight;

            switch (arrParameters[2])
            {
            case "S":
                bearing = (speed != ManeuverSpeed.Speed0) ? ManeuverBearing.Straight : ManeuverBearing.Stationary;
                break;

            case "R":
                bearing = (direction == ManeuverDirection.Forward) ? ManeuverBearing.KoiogranTurn : ManeuverBearing.SegnorsLoop;
                break;

            case "r":
                bearing = ManeuverBearing.SegnorsLoopUsingTurnTemplate;
                break;

            case "E":
                bearing = ManeuverBearing.TallonRoll;
                break;

            case "B":
                bearing = ManeuverBearing.Bank;
                break;

            case "T":
                bearing = ManeuverBearing.Turn;
                break;

            case "V":
                bearing = ManeuverBearing.ReverseStraight;
                break;
            }

            Speed     = speed;
            Direction = direction;
            Bearing   = bearing;

            ship    = ship ?? Selection.ThisShip;
            shipTag = ship.GetTag();

            if (!ship.Maneuvers.ContainsKey(parameters))
            {
                Console.Write("<b>Ship " + ship.ShipInfo.ShipName + " doesn't have maneuver " + parameters + "</b>", LogTypes.Errors, true, "red");
            }
            ColorComplexity = ship.Maneuvers[parameters];
            ColorComplexity = ship.GetColorComplexityOfManeuver(this);
        }
Пример #6
0
 public ReverseStraightMovement(int speed, ManeuverDirection direction, ManeuverBearing bearing, MovementComplexity color) : base(speed, direction, bearing, color)
 {
 }
Пример #7
0
 public SideslipTurnMovement(int speed, ManeuverDirection direction, ManeuverBearing bearing, MovementComplexity color) : base(speed, direction, bearing, color)
 {
 }
Пример #8
0
        // GENERAL

        public NonStraightMovement(int speed, ManeuverDirection direction, ManeuverBearing bearing, ManeuverColor color) : base(speed, direction, bearing, color)
        {
        }
Пример #9
0
 public SegnorsLoopMovement(int speed, ManeuverDirection direction, ManeuverBearing bearing, ManeuverColor color) : base(speed, direction, bearing, color)
 {
 }
Пример #10
0
 public StationaryMovement(int speed, ManeuverDirection direction, ManeuverBearing bearing, ManeuverColor color) : base(speed, direction, bearing, color)
 {
 }
Пример #11
0
        public ManeuverHolder(string parameters, Ship.GenericShip ship = null)
        {
            string[] arrParameters = parameters.Split('.');
            if (arrParameters.Length < 3)
            {
                Messages.ShowError($"Error: maneuverCode is invalid, only {arrParameters.Length} blocks. String: \"{parameters}\"");
            }

            ManeuverSpeed speed = ManeuverSpeed.Speed1;

            switch (arrParameters[0])
            {
            case "0":
                speed = ManeuverSpeed.Speed0;
                break;

            case "1":
                speed = ManeuverSpeed.Speed1;
                break;

            case "2":
                speed = ManeuverSpeed.Speed2;
                break;

            case "3":
                speed = ManeuverSpeed.Speed3;
                break;

            case "4":
                speed = ManeuverSpeed.Speed4;
                break;

            case "5":
                speed = ManeuverSpeed.Speed5;
                break;

            default:
                Messages.ShowError($"Error: Speed in maneuverCode is invalid, \"{arrParameters[0]}\"");
                break;
            }

            ManeuverDirection direction = ManeuverDirection.Forward;

            switch (arrParameters[1])
            {
            case "F":
                direction = ManeuverDirection.Forward;
                break;

            case "L":
                direction = ManeuverDirection.Left;
                break;

            case "R":
                direction = ManeuverDirection.Right;
                break;

            case "S":
                direction = ManeuverDirection.Stationary;
                break;

            default:
                Messages.ShowError($"Error: Direction in maneuverCode is invalid, \"{arrParameters[1]}\"");
                break;
            }

            ManeuverBearing bearing = ManeuverBearing.Straight;

            switch (arrParameters[2])
            {
            case "S":
                bearing = (speed != ManeuverSpeed.Speed0) ? ManeuverBearing.Straight : ManeuverBearing.Stationary;
                break;

            case "R":
                bearing = (direction == ManeuverDirection.Forward) ? ManeuverBearing.KoiogranTurn : ManeuverBearing.SegnorsLoop;
                break;

            case "r":
                bearing = ManeuverBearing.SegnorsLoopUsingTurnTemplate;
                break;

            case "E":
                bearing = ManeuverBearing.TallonRoll;
                break;

            case "B":
                bearing = ManeuverBearing.Bank;
                break;

            case "b":
                bearing = ManeuverBearing.SideslipBank;
                break;

            case "T":
                bearing = ManeuverBearing.Turn;
                break;

            case "t":
                bearing = ManeuverBearing.SideslipTurn;
                break;

            case "V":
                bearing = ManeuverBearing.ReverseStraight;
                break;

            default:
                Messages.ShowError($"Error: Bearing in maneuverCode is invalid, \"{arrParameters[2]}\"");
                break;
            }

            Speed     = speed;
            Direction = direction;
            Bearing   = bearing;

            ship    = ship ?? Selection.ThisShip;
            shipTag = ship.GetTag();

            if (!ship.Maneuvers.ContainsKey(parameters))
            {
                //
            }
            ColorComplexity = ship.Maneuvers[parameters];
            ColorComplexity = ship.GetColorComplexityOfManeuver(this);
        }
Пример #12
0
 public SegnorsLoopUsingTurnTemplateMovement(int speed, ManeuverDirection direction, ManeuverBearing bearing, MovementComplexity color) : base(speed, direction, bearing, color)
 {
 }