Exemplo n.º 1
0
        public void AddBeacon(Beacon beacon)
        {
            if (!beacons.Contains(beacon))
            {
                if (options.Contains("Back"))
                {
                    options.Remove("Back");
                }

                beacons.Add(beacon);
                options.Add(beacon.name);
                options.Add("Back");
            }
        }
Exemplo n.º 2
0
        public override void Initialize()
        {
            base.Initialize();

            name = "Rebel Outpost";

            spaceRegionArea = new Rectangle(102000, 78000, 2000, 1500);

            rebelStation1 = new RebelBaseStation(game, spriteSheet, new Vector2(spaceRegionArea.X, spaceRegionArea.Y));
            rebelStation1.Initialize();

            rebelBeacon = new Beacon(game, spriteSheet, new Rectangle(681, 234, 100, 100), new Rectangle(580, 234, 100, 100),
                                     "Rebel Base Beacon", rebelStation1.position + new Vector2(300, 250));
            rebelBeacon.Initialize();

            rebelBaseShop = new RebelBaseShop(game, spriteSheet, rebelStation1.position);
            rebelBaseShop.Initialize();

            AddGameObject(rebelStation1);
            AddGameObject(rebelBeacon);
            AddGameObject(rebelBaseShop);

            game.stateManager.overworldState.AddBeacon(rebelBeacon);
        }
Exemplo n.º 3
0
 public void AddBeacon(Beacon beacon)
 {
     beacons.Add(beacon);
 }
Exemplo n.º 4
0
        public override void Initialize()
        {
            base.Initialize();

            name = "Sector X";

            spriteSheet = new Sprite(game.Content.Load <Texture2D>("Overworld-Sprites/SectorXSpriteSheet"), null);

            spaceRegionArea = new Rectangle(85000, 85000, 30000, 30000);
            Vector2 offset = new Vector2(spaceRegionArea.X, spaceRegionArea.Y);

            sectorXStar = new SectorXStar(game, spriteSheet);
            sectorXStar.Initialize();

            // Sub-interactive objects
            soelara            = new Soelara(game, spriteSheet);
            fortrun            = new Fortrun(game, spriteSheet);
            lavis              = new Lavis(game, spriteSheet);
            informationStation = new InformationStation(game, spriteSheet);
            fortrunStation2    = new FortrunStation2(game, spriteSheet);
            lonelyAsteroid     = new LonelyAsteroid(game, spriteSheet);
            damagedShip        = new DamagedShip(game, new Sprite(game.Content.Load <Texture2D>("Overworld-Sprites/MissionObjectSpriteSheet"), null));
            spaceDuck          = new SpaceDuck(game, spriteSheet);

            var rebelAsteroidFieldGenerator   = new RebelOutpostAsteroidField(game, spriteSheet);
            var sunAsteroidBeltGenerator      = new SunAsteroidBelt(game, spriteSheet);
            var lavisAsteroidBeltGenerator    = new LavisAsteroidBelt(game, spriteSheet);
            var westernAsteroidFieldGenerator = new WesternAsteroidField(game, spriteSheet);
            var telmunAsteroidFieldGenerator  = new TelmunAsteroidBelt(game, spriteSheet);

            // For testing purposes // Jakob 150623
            //var testFieldGenerator = new TestingField(game, spriteSheet);
            //subInteractiveObjects.AddRange(testFieldGenerator.GetAsteroids());

            subInteractiveObjects.AddRange(rebelAsteroidFieldGenerator.GetAsteroids());
            subInteractiveObjects.AddRange(sunAsteroidBeltGenerator.GetAsteroids());
            subInteractiveObjects.AddRange(lavisAsteroidBeltGenerator.GetAsteroids());
            subInteractiveObjects.AddRange(westernAsteroidFieldGenerator.GetAsteroids());
            subInteractiveObjects.AddRange(telmunAsteroidFieldGenerator.GetAsteroids());

            subInteractiveObjects.Add(soelara);
            subInteractiveObjects.Add(fortrun);
            subInteractiveObjects.Add(lavis);
            subInteractiveObjects.Add(fortrunStation2);
            subInteractiveObjects.Add(lonelyAsteroid);
            subInteractiveObjects.Add(damagedShip);
            subInteractiveObjects.Add(spaceDuck);
            subInteractiveObjects.Add(informationStation);

            foreach (var obj in subInteractiveObjects)
            {
                obj.Initialize();
            }

            // Planets
            highfence   = new Highfence(game, spriteSheet, offset);
            newNorrland = new NewNorrland(game, spriteSheet, offset);
            peye        = new Peye(game, spriteSheet, offset);
            highfence.Initialize();
            newNorrland.Initialize();
            peye.Initialize();

            // Stations
            lavisStation    = new LavisStation(game, spriteSheet, lavis.position);
            soelaraStation  = new SoelaraStation(game, spriteSheet, soelara.position);
            fortrunStation1 = new FortrunStation1(game, spriteSheet, fortrun.position);
            lavisStation.Initialize();
            soelaraStation.Initialize();
            fortrunStation1.Initialize();

            // Shops
            highfenceShop = new HighfenceShop(game, spriteSheet, highfence.position);
            fortrunShop   = new FortrunShop(game, spriteSheet, fortrun.position);
            peyeShop      = new PeyeShop(game, spriteSheet, peye.position);
            highfenceShop.Initialize();
            fortrunShop.Initialize();
            peyeShop.Initialize();

            // Training area
            var outpostSpriteSheet = game.stateManager.overworldState.outpostSpriteSheet;

            trainingArea2 = new TrainingArea2(game, outpostSpriteSheet, MathFunctions.CoordinateToPosition(new Vector2(-1680, 10)));
            trainingArea2.Initialize();

            highfenceBeacon = new Beacon(game, spriteSheet, new Rectangle(588, 844, 100, 100), new Rectangle(487, 844, 100, 100),
                                         "Highfence Beacon", highfence.position + new Vector2(300, 250));
            highfenceBeacon.Initialize();

            fortrunBeacon = new Beacon(game, spriteSheet, new Rectangle(588, 844, 100, 100), new Rectangle(487, 844, 100, 100),
                                       "Fortrun Beacon", fortrun.position + new Vector2(350, 100));
            fortrunBeacon.Initialize();

            peyeBeacon = new Beacon(game, spriteSheet, new Rectangle(588, 844, 100, 100), new Rectangle(487, 844, 100, 100),
                                    "Peye Beacon", peye.position + new Vector2(-200, -450));
            peyeBeacon.Initialize();

            lavisBeacon = new Beacon(game, spriteSheet, new Rectangle(588, 844, 100, 100), new Rectangle(487, 844, 100, 100),
                                     "Lavis Beacon", lavis.position + new Vector2(150, 350));
            lavisBeacon.Initialize();

            soelaraBeacon = new Beacon(game, spriteSheet, new Rectangle(588, 844, 100, 100), new Rectangle(487, 844, 100, 100),
                                       "Soelara Beacon", soelara.position + new Vector2(300, 350));
            soelaraBeacon.Initialize();

            newNorrlandBeacon = new Beacon(game, spriteSheet, new Rectangle(588, 844, 100, 100), new Rectangle(487, 844, 100, 100),
                                           "New Norrland Beacon", newNorrland.position + new Vector2(-300, 100));
            newNorrlandBeacon.Initialize();

            game.stateManager.overworldState.AddBeacon(highfenceBeacon);
            game.stateManager.overworldState.AddBeacon(fortrunBeacon);
            game.stateManager.overworldState.AddBeacon(peyeBeacon);
            game.stateManager.overworldState.AddBeacon(lavisBeacon);
            game.stateManager.overworldState.AddBeacon(soelaraBeacon);
            game.stateManager.overworldState.AddBeacon(newNorrlandBeacon);

            AddGameObject(sectorXStar);

            AddGameObject(highfence);
            AddGameObject(newNorrland);
            AddGameObject(peye);

            AddGameObject(lavisStation);
            AddGameObject(fortrunStation1);
            AddGameObject(soelaraStation);
            AddGameObject(trainingArea2);

            AddGameObject(highfenceShop);
            AddGameObject(fortrunShop);
            AddGameObject(peyeShop);

            AddGameObject(highfenceBeacon);
            AddGameObject(fortrunBeacon);
            AddGameObject(peyeBeacon);
            AddGameObject(lavisBeacon);
            AddGameObject(soelaraBeacon);
            AddGameObject(newNorrlandBeacon);

            foreach (var obj in subInteractiveObjects)
            {
                AddGameObject(obj);
            }
        }