Beispiel #1
0
        public ArcBullseye(GenericShipBase shipBase) : base(shipBase)
        {
            ArcType = ArcTypes.Bullseye;
            Facing  = ArcFacing.Bullseye;

            Limits = new Dictionary <Vector3, float>()
            {
                { new Vector3(-shipBase.HALF_OF_BULLSEYEARC_SIZE, 0, 0), 0f },
                { new Vector3(shipBase.HALF_OF_BULLSEYEARC_SIZE, 0, 0), 0f }
            };

            Edges = new List <Vector3>()
            {
                new Vector3(-shipBase.HALF_OF_BULLSEYEARC_SIZE, 0, 0),
                new Vector3(shipBase.HALF_OF_BULLSEYEARC_SIZE, 0, 0),
            };

            ShotPermissions = new ArcShotPermissions()
            {
                CanShootPrimaryWeapon = true,
                CanShootCannon        = true,
                CanShootMissiles      = true,
                CanShootTorpedoes     = true,
                CanShootTurret        = true
            };
        }
Beispiel #2
0
        public ArcPrimary(GenericShipBase shipBase) : base(shipBase)
        {
            ArcType = ArcTypes.Primary;
            Facing  = ArcFacing.Forward;

            Limits = new Dictionary <Vector3, float>()
            {
                { new Vector3(-shipBase.HALF_OF_FIRINGARC_SIZE, 0, 0), -40f },
                { new Vector3(shipBase.HALF_OF_FIRINGARC_SIZE, 0, 0), 40f }
            };

            Edges = new List <Vector3>()
            {
                new Vector3(-shipBase.HALF_OF_FIRINGARC_SIZE, 0, 0),
                new Vector3(shipBase.HALF_OF_FIRINGARC_SIZE, 0, 0),
            };

            ShotPermissions = new ArcShotPermissions()
            {
                CanShootPrimaryWeapon = true,
                CanShootCannon        = true,
                CanShootMissiles      = true,
                CanShootTorpedoes     = true,
                CanShootTurret        = true
            };
        }
Beispiel #3
0
        public OutOfArc(GenericShipBase shipBase) : base(shipBase)
        {
            ArcType = ArcTypes.None;
            Facing  = ArcFacing.None;

            Limits = new Dictionary <Vector3, float>();
            Edges  = new List <Vector3>()
            {
                new Vector3(-shipBase.HALF_OF_SHIPSTAND_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_SHIPSTAND_SIZE, 0, -shipBase.SHIPSTAND_SIZE)
            };

            ShotPermissions = new ArcShotPermissions(); //Cannot shoot out of arc by default
        }
Beispiel #4
0
        public ArcBullseye(GenericShipBase shipBase) : base(shipBase)
        {
            ArcType = ArcTypes.Bullseye;
            Facing  = ArcFacing.Bullseye;

            Limits = new Dictionary <Vector3, float>()
            {
                { new Vector3(-shipBase.HALF_OF_BULLSEYEARC_SIZE, 0, 0), 0f },
                { new Vector3(shipBase.HALF_OF_BULLSEYEARC_SIZE, 0, 0), 0f }
            };

            Edges = new List <Vector3>()
            {
                new Vector3(-shipBase.HALF_OF_BULLSEYEARC_SIZE, 0, 0),
                new Vector3(shipBase.HALF_OF_BULLSEYEARC_SIZE, 0, 0),
            };

            ShotPermissions = new ArcShotPermissions();
        }
Beispiel #5
0
        public ArcSpecialGhost(GenericShipBase shipBase) : base(shipBase)
        {
            ArcType = ArcTypes.SpecialGhost;
            Facing  = ArcFacing.Rear;

            Limits = 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 }
            };

            Edges = 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),
            };

            ShotPermissions = new ArcShotPermissions()
            {
                CanShootTorpedoes = true,
            };
        }
Beispiel #6
0
        public ArcSpecial180Rear(GenericShipBase shipBase) : base(shipBase)
        {
            ArcType = ArcTypes.Special180Rear;
            Facing  = ArcFacing.Rear180;

            Limits = new Dictionary <Vector3, float>()
            {
                { new Vector3(-shipBase.HALF_OF_SHIPSTAND_SIZE, 0, -shipBase.HALF_OF_SHIPSTAND_SIZE), -90f },
                { new Vector3(shipBase.HALF_OF_SHIPSTAND_SIZE, 0, -shipBase.HALF_OF_SHIPSTAND_SIZE), 90f }
            };

            Edges = new List <Vector3>()
            {
                new Vector3(-shipBase.HALF_OF_SHIPSTAND_SIZE, 0, -shipBase.HALF_OF_SHIPSTAND_SIZE),
                new Vector3(shipBase.HALF_OF_SHIPSTAND_SIZE, 0, -shipBase.HALF_OF_SHIPSTAND_SIZE),
                new Vector3(-shipBase.HALF_OF_SHIPSTAND_SIZE, 0, -shipBase.SHIPSTAND_SIZE),
                new Vector3(shipBase.HALF_OF_SHIPSTAND_SIZE, 0, -shipBase.SHIPSTAND_SIZE)
            };

            ShotPermissions = new ArcShotPermissions()
            {
                CanShootPrimaryWeapon = true,
            };
        }
Beispiel #7
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();
        }