コード例 #1
0
        private InterceptorStation CreateInterceptorStation2(ThreatController threatController)
        {
            var interceptorComponent2 = new InterceptorsInSpaceComponent(this, StationLocation.Interceptor2);
            var interceptorStation2   = new InterceptorStation(
                StationLocation.Interceptor2,
                threatController,
                interceptorComponent2);

            return(interceptorStation2);
        }
コード例 #2
0
        private InterceptorStation CreateInterceptorStation1(ThreatController threatController)
        {
            var interceptorComponent1 = new InterceptorsInSpaceComponent(this, StationLocation.Interceptor1);
            var interceptorStation1   = new InterceptorStation(
                StationLocation.Interceptor1,
                threatController,
                interceptorComponent1);

            return(interceptorStation1);
        }
コード例 #3
0
        private InterceptorStation CreateInterceptorStation3(ThreatController threatController)
        {
            var interceptorComponent3 = new InterceptorsInSpaceComponent(this, StationLocation.Interceptor3);
            var interceptorStation3   = new InterceptorStation(
                StationLocation.Interceptor3,
                threatController,
                interceptorComponent3);

            return(interceptorStation3);
        }
コード例 #4
0
        //TODO: Wire up all 3 stations if variable range interceptors are allowed
        public SittingDuck()
        {
            CurrentThreatBuffs     = new Dictionary <ExternalThreat, ExternalThreatBuff>();
            CurrentInternalThreats = new List <InternalThreat>();
            CurrentExternalThreats = new List <ExternalThreat>();
            var whiteReactor                = new CentralReactor();
            var redReactor                  = new SideReactor(whiteReactor);
            var blueReactor                 = new SideReactor(whiteReactor);
            var redBatteryPack              = new BatteryPack();
            var blueBatteryPack             = new BatteryPack();
            var computerComponent           = new ComputerComponent();
            var visualConfirmationComponent = new VisualConfirmationComponent();
            var rocketsComponent            = new RocketsComponent();

            Computer = computerComponent;
            VisualConfirmationComponent = visualConfirmationComponent;
            RocketsComponent            = rocketsComponent;
            var interceptorStation = new InterceptorStation
            {
                StationLocation = StationLocation.Interceptor
            };
            var upperRedStation = new StandardStation
            {
                Cannon          = new SideHeavyLaserCannon(redReactor, ZoneLocation.Red),
                EnergyContainer = new SideShield(redReactor),
                StationLocation = StationLocation.UpperRed
            };

            interceptorStation.InterceptorComponent = new InterceptorComponent(null, upperRedStation);
            upperRedStation.CComponent = new InterceptorComponent(interceptorStation, null);
            var upperWhiteStation = new StandardStation
            {
                Cannon          = new CentralHeavyLaserCannon(whiteReactor, ZoneLocation.White),
                EnergyContainer = new CentralShield(whiteReactor),
                StationLocation = StationLocation.UpperWhite,
                CComponent      = computerComponent
            };
            var upperBlueStation = new StandardStation
            {
                Cannon          = new SideHeavyLaserCannon(blueReactor, ZoneLocation.Blue),
                EnergyContainer = new SideShield(blueReactor),
                StationLocation = StationLocation.UpperBlue,
                CComponent      = new BattleBotsComponent()
            };
            var lowerRedStation = new StandardStation
            {
                Cannon          = new SideLightLaserCannon(redBatteryPack, ZoneLocation.Red),
                EnergyContainer = redReactor,
                StationLocation = StationLocation.LowerRed,
                CComponent      = new BattleBotsComponent()
            };

            var lowerWhiteStation = new StandardStation
            {
                Cannon          = new PulseCannon(whiteReactor),
                EnergyContainer = whiteReactor,
                StationLocation = StationLocation.LowerWhite,
                CComponent      = visualConfirmationComponent
            };
            var lowerBlueStation = new StandardStation
            {
                Cannon          = new SideLightLaserCannon(blueBatteryPack, ZoneLocation.Blue),
                EnergyContainer = blueReactor,
                StationLocation = StationLocation.LowerBlue,
                CComponent      = rocketsComponent
            };

            upperRedStation.BluewardStation       = upperWhiteStation;
            upperRedStation.OppositeDeckStation   = lowerRedStation;
            upperWhiteStation.RedwardStation      = upperRedStation;
            upperWhiteStation.BluewardStation     = upperBlueStation;
            upperWhiteStation.OppositeDeckStation = lowerWhiteStation;
            upperBlueStation.RedwardStation       = upperWhiteStation;
            upperBlueStation.OppositeDeckStation  = lowerBlueStation;
            lowerRedStation.BluewardStation       = lowerWhiteStation;
            lowerRedStation.OppositeDeckStation   = upperRedStation;
            lowerWhiteStation.RedwardStation      = lowerRedStation;
            lowerWhiteStation.BluewardStation     = lowerBlueStation;
            lowerWhiteStation.OppositeDeckStation = upperWhiteStation;
            lowerBlueStation.RedwardStation       = lowerWhiteStation;
            lowerBlueStation.OppositeDeckStation  = upperBlueStation;

            RedZone = new Zone {
                LowerStation = lowerRedStation, UpperStation = upperRedStation, ZoneLocation = ZoneLocation.Red, Gravolift = new Gravolift()
            };
            WhiteZone = new Zone {
                LowerStation = lowerWhiteStation, UpperStation = upperWhiteStation, ZoneLocation = ZoneLocation.White, Gravolift = new Gravolift()
            };
            BlueZone = new Zone {
                LowerStation = lowerBlueStation, UpperStation = upperBlueStation, ZoneLocation = ZoneLocation.Blue, Gravolift = new Gravolift()
            };
            ZonesByLocation   = new[] { RedZone, WhiteZone, BlueZone }.ToDictionary(zone => zone.ZoneLocation);
            StationByLocation = Zones
                                .SelectMany(zone => new[] { zone.LowerStation, zone.UpperStation })
                                .Concat(new Station[] { interceptorStation })
                                .ToDictionary(station => station.StationLocation);
            InterceptorStation = interceptorStation;
        }