Пример #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
            };
        }
Пример #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
        public OutOfArc(GenericShipBase shipBase) : base(shipBase)
        {
            ArcType = ArcType.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)
            };
        }
Пример #4
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
        }
Пример #5
0
        public ArcBullseye(GenericShipBase shipBase) : base(shipBase)
        {
            ArcType = ArcType.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),
            };
        }
Пример #6
0
        public ArcRear(GenericShipBase shipBase) : base(shipBase)
        {
            ArcType = ArcType.Rear;
            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),
            };
        }
Пример #7
0
        public ArcFront(GenericShipBase shipBase) : base(shipBase)
        {
            ArcType = ArcType.Front;
            Facing  = ArcFacing.Front;

            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),
            };
        }
Пример #8
0
        public ArcFullRear(GenericShipBase shipBase) : base(shipBase)
        {
            ArcType = ArcType.FullRear;
            Facing  = ArcFacing.FullRear;

            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)
            };
        }
Пример #9
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,
            };
        }
Пример #10
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,
            };
        }
Пример #11
0
 public GenericArc(GenericShipBase shipBase)
 {
     ShipBase = shipBase;
     Phases.Events.OnRoundEnd += ClearCannotBeUsedForAttackThisRoundFlag;
 }
Пример #12
0
 public ArcSector(GenericShipBase shipBase) : base(shipBase)
 {
 }
Пример #13
0
 public GenericArc(GenericShipBase shipBase)
 {
     ShipBase = shipBase;
 }
Пример #14
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();
        }
Пример #15
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();
        }