コード例 #1
0
ファイル: ArcBullseye.cs プロジェクト: xNyer/FlyCasual
        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
            };
        }
コード例 #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
            };
        }
コード例 #3
0
ファイル: OutOfArc.cs プロジェクト: xNyer/FlyCasual
        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
        }
コード例 #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();
        }
コード例 #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,
            };
        }
コード例 #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,
            };
        }
コード例 #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();
        }