Пример #1
0
        public ArcSingleTurret(GenericShipBase shipBase) : base(shipBase)
        {
            ArcType = ArcType.SingleTurret;

            // Arcs

            MobileArcParameters = new List <MobileSubArc>
            {
                new MobileSubArc
                (
                    ArcFacing.None,
                    new Dictionary <Vector3, float>()
                {
                    { new Vector3(-shipBase.HALF_OF_FIRINGARC_SIZE, 0, 0), -40f },
                    { new Vector3(shipBase.HALF_OF_FIRINGARC_SIZE, 0, 0), 40f }
                },
                    new List <Vector3>()
                {
                    new Vector3(-shipBase.HALF_OF_FIRINGARC_SIZE, 0, 0),
                    new Vector3(shipBase.HALF_OF_FIRINGARC_SIZE, 0, 0),
                }
                ),
                new MobileSubArc
                (
                    ArcFacing.Front,
                    new Dictionary <Vector3, float>()
                {
                    { new Vector3(-shipBase.HALF_OF_FIRINGARC_SIZE, 0, 0), -40f },
                    { new Vector3(shipBase.HALF_OF_FIRINGARC_SIZE, 0, 0), 40f }
                },
                    new List <Vector3>()
                {
                    new Vector3(-shipBase.HALF_OF_FIRINGARC_SIZE, 0, 0),
                    new Vector3(shipBase.HALF_OF_FIRINGARC_SIZE, 0, 0),
                }
                ),
                new MobileSubArc
                (
                    ArcFacing.Left,
                    new Dictionary <Vector3, float>()
                {
                    { new Vector3(-shipBase.HALF_OF_FIRINGARC_SIZE, 0, -shipBase.SHIPSTAND_SIZE), -140f },
                    { new Vector3(-shipBase.HALF_OF_FIRINGARC_SIZE, 0, 0), -40f }
                },
                    new List <Vector3>()
                {
                    new Vector3(-shipBase.HALF_OF_FIRINGARC_SIZE, 0, 0),
                    new Vector3(-shipBase.HALF_OF_SHIPSTAND_SIZE, 0, 0),
                    new Vector3(-shipBase.HALF_OF_SHIPSTAND_SIZE, 0, -shipBase.SHIPSTAND_SIZE),
                    new Vector3(-shipBase.HALF_OF_FIRINGARC_SIZE, 0, -shipBase.SHIPSTAND_SIZE),
                }
                ),
                new MobileSubArc
                (
                    ArcFacing.Right,
                    new Dictionary <Vector3, float>()
                {
                    { new Vector3(shipBase.HALF_OF_FIRINGARC_SIZE, 0, 0), 40f },
                    { new Vector3(shipBase.HALF_OF_FIRINGARC_SIZE, 0, -shipBase.SHIPSTAND_SIZE), 140f },
                },
                    new List <Vector3>()
                {
                    new Vector3(shipBase.HALF_OF_FIRINGARC_SIZE, 0, 0),
                    new Vector3(shipBase.HALF_OF_SHIPSTAND_SIZE, 0, 0),
                    new Vector3(shipBase.HALF_OF_SHIPSTAND_SIZE, 0, -shipBase.SHIPSTAND_SIZE),
                    new Vector3(shipBase.HALF_OF_FIRINGARC_SIZE, 0, -shipBase.SHIPSTAND_SIZE),
                }
                ),
                new MobileSubArc
                (
                    ArcFacing.Rear,
                    new Dictionary <Vector3, float>()
                {
                    { new Vector3(-shipBase.HALF_OF_FIRINGARC_SIZE, 0, -shipBase.SHIPSTAND_SIZE), -140f },
                    { new Vector3(shipBase.HALF_OF_FIRINGARC_SIZE, 0, -shipBase.SHIPSTAND_SIZE), 140f }
                },
                    new List <Vector3>()
                {
                    new Vector3(-shipBase.HALF_OF_FIRINGARC_SIZE, 0, -shipBase.SHIPSTAND_SIZE),
                    new Vector3(shipBase.HALF_OF_FIRINGARC_SIZE, 0, -shipBase.SHIPSTAND_SIZE),
                }
                )
            };

            ActiveMobileSubArc = MobileArcParameters[0];

            // Events
            Host = shipBase.Host;
            SubscribeToShipSetup(Host);

            // Pointer
            ShowMobileArcPointer();
        }
Пример #2
0
        public ArcMobile(GenericShipBase shipBase) : base(shipBase)
        {
            ArcType = ArcTypes.Mobile;

            ShotPermissions = new ArcShotPermissions()
            {
                CanShootPrimaryWeapon = true,
                CanShootTurret        = true
            };

            // Arcs

            MobileArcParameters = new List <MobileSubArc>
            {
                new MobileSubArc
                (
                    ArcFacing.Forward,
                    new Dictionary <Vector3, float>()
                {
                    { new Vector3(-shipBase.HALF_OF_FIRINGARC_SIZE, 0, 0), -40f },
                    { new Vector3(shipBase.HALF_OF_FIRINGARC_SIZE, 0, 0), 40f }
                },
                    new List <Vector3>()
                {
                    new Vector3(-shipBase.HALF_OF_FIRINGARC_SIZE, 0, 0),
                    new Vector3(shipBase.HALF_OF_FIRINGARC_SIZE, 0, 0),
                }
                ),
                new MobileSubArc
                (
                    ArcFacing.Left,
                    new Dictionary <Vector3, float>()
                {
                    { new Vector3(-shipBase.HALF_OF_FIRINGARC_SIZE, 0, -shipBase.SHIPSTAND_SIZE), -140f },
                    { new Vector3(-shipBase.HALF_OF_FIRINGARC_SIZE, 0, 0), -40f }
                },
                    new List <Vector3>()
                {
                    new Vector3(-shipBase.HALF_OF_FIRINGARC_SIZE, 0, 0),
                    new Vector3(-shipBase.HALF_OF_SHIPSTAND_SIZE, 0, 0),
                    new Vector3(-shipBase.HALF_OF_SHIPSTAND_SIZE, 0, -shipBase.SHIPSTAND_SIZE),
                    new Vector3(-shipBase.HALF_OF_FIRINGARC_SIZE, 0, -shipBase.SHIPSTAND_SIZE),
                }
                ),
                new MobileSubArc
                (
                    ArcFacing.Right,
                    new Dictionary <Vector3, float>()
                {
                    { new Vector3(shipBase.HALF_OF_FIRINGARC_SIZE, 0, 0), 40f },
                    { new Vector3(shipBase.HALF_OF_FIRINGARC_SIZE, 0, -shipBase.SHIPSTAND_SIZE), 140f },
                },
                    new List <Vector3>()
                {
                    new Vector3(shipBase.HALF_OF_FIRINGARC_SIZE, 0, 0),
                    new Vector3(shipBase.HALF_OF_SHIPSTAND_SIZE, 0, 0),
                    new Vector3(shipBase.HALF_OF_SHIPSTAND_SIZE, 0, -shipBase.SHIPSTAND_SIZE),
                    new Vector3(shipBase.HALF_OF_FIRINGARC_SIZE, 0, -shipBase.SHIPSTAND_SIZE),
                }
                ),
                new MobileSubArc
                (
                    ArcFacing.Rear,
                    new Dictionary <Vector3, float>()
                {
                    { new Vector3(-shipBase.HALF_OF_FIRINGARC_SIZE, 0, -shipBase.SHIPSTAND_SIZE), -140f },
                    { new Vector3(shipBase.HALF_OF_FIRINGARC_SIZE, 0, -shipBase.SHIPSTAND_SIZE), 140f }
                },
                    new List <Vector3>()
                {
                    new Vector3(-shipBase.HALF_OF_FIRINGARC_SIZE, 0, -shipBase.SHIPSTAND_SIZE),
                    new Vector3(shipBase.HALF_OF_FIRINGARC_SIZE, 0, -shipBase.SHIPSTAND_SIZE),
                }
                )
            };

            ActiveMobileSubArc = MobileArcParameters[0];

            // Events
            Host = shipBase.Host;
            SubscribeToShipSetup(Host);

            // Pointer
            ShowMobileArcPointer();
        }