コード例 #1
0
        public LevelTesterState(Game1 game, string name) :
            base(game, name)
        {
            lifeFactor  = 1;
            initialLife = StatsManager.Armor();

            smallFont = game.Content.Load <SpriteFont>("Fonts/Iceland_12");

            display1.Add("Press Enter to start chosen level");
            display1.Add("Press Escape to return to main menu");
            display1.Add("Use number keys (0-9) to switch equipment");

            var missionPathDict = ShooterState.GetMissionPathDict();

            johansLevelEntries.Add(new LevelTesterEntry(missionPathDict["1_1"], Keys.Z, standardEquip: 1));
            johansLevelEntries.Add(new LevelTesterEntry(missionPathDict["2_1"], Keys.X, standardEquip: 2));
            johansLevelEntries.Add(new LevelTesterEntry(missionPathDict["2_2"], Keys.C, standardEquip: 2));
            johansLevelEntries.Add(new LevelTesterEntry(missionPathDict["3_1"], Keys.V, standardEquip: 3));
            johansLevelEntries.Add(new LevelTesterEntry(missionPathDict["3_2"], Keys.B, standardEquip: 3));

            jakobsLevelEntries.Add(new LevelTesterEntry(missionPathDict["4_1"], Keys.A, standardEquip: 4));
            jakobsLevelEntries.Add(new LevelTesterEntry(missionPathDict["4_2"], Keys.S, standardEquip: 4));
            jakobsLevelEntries.Add(new LevelTesterEntry(missionPathDict["5_1"], Keys.D, standardEquip: 5));
            jakobsLevelEntries.Add(new LevelTesterEntry(missionPathDict["5_2"], Keys.F, standardEquip: 5));
            jakobsLevelEntries.Add(new LevelTesterEntry(missionPathDict["6_1"], Keys.G, standardEquip: 6));
            jakobsLevelEntries.Add(new LevelTesterEntry(missionPathDict["6_2"], Keys.H, standardEquip: 6));
            jakobsLevelEntries.Add(new LevelTesterEntry(missionPathDict["7_1"], Keys.J, standardEquip: 6));
            jakobsLevelEntries.Add(new LevelTesterEntry(missionPathDict["8o_1"], Keys.K, standardEquip: 7));
            jakobsLevelEntries.Add(new LevelTesterEntry(missionPathDict["8o_2"], Keys.L, standardEquip: 7));
            jakobsLevelEntries.Add(new LevelTesterEntry(missionPathDict["8r_1"], Keys.Q, standardEquip: 7));
            jakobsLevelEntries.Add(new LevelTesterEntry(missionPathDict["8r_2"], Keys.W, standardEquip: 7));
            jakobsLevelEntries.Add(new LevelTesterEntry(missionPathDict["8a_1"], Keys.E, standardEquip: 7));
            jakobsLevelEntries.Add(new LevelTesterEntry(missionPathDict["8a_2"], Keys.R, standardEquip: 7));

            jakobsLevelEntries.Add(new LevelTesterEntry(missionPathDict["rp1"], Keys.F1, standardEquip: 2));
            jakobsLevelEntries.Add(new LevelTesterEntry(missionPathDict["rp2"], Keys.F2, standardEquip: 2));
            jakobsLevelEntries.Add(new LevelTesterEntry(missionPathDict["rp3"], Keys.F3, standardEquip: 2));
            jakobsLevelEntries.Add(new LevelTesterEntry(missionPathDict["rp4"], Keys.F4, standardEquip: 2));
            jakobsLevelEntries.Add(new LevelTesterEntry(missionPathDict["rp5"], Keys.F5, standardEquip: 2));

            jakobsLevelEntries.Add(new LevelTesterEntry(missionPathDict["ap1"], Keys.F6, standardEquip: 4));
            jakobsLevelEntries.Add(new LevelTesterEntry(missionPathDict["ap2"], Keys.F7, standardEquip: 4));
            jakobsLevelEntries.Add(new LevelTesterEntry(missionPathDict["ap3"], Keys.F8, standardEquip: 4));
            jakobsLevelEntries.Add(new LevelTesterEntry(missionPathDict["ap4"], Keys.F9, standardEquip: 4));
            jakobsLevelEntries.Add(new LevelTesterEntry(missionPathDict["ap5"], Keys.F10, standardEquip: 4));

            chosenLevel = jakobsLevelEntries[0].GetLevelEntry();
        }
コード例 #2
0
        public CampaignState(Game1 game, string name) :
            base(game, name)
        {
            lifeFactor  = 1;
            initialLife = StatsManager.Armor();

            smallFont = game.Content.Load <SpriteFont>("Fonts/Iceland_12");
            bigFont   = game.Content.Load <SpriteFont>("Fonts/ISL_Jupiter_24");

            //display1.Add("Press Enter to start chosen level");
            //display1.Add("Press Escape to return to main menu");
            //display1.Add("Use number keys (0-9) to switch equipment");

            var jakobMissionPathDict = ShooterState.GetMissionPathDict();

            campaignEntries.Add(new LevelTesterEntry(jakobMissionPathDict["1_1"], Keys.A, standardEquip: 1));
            campaignEntries.Add(new LevelTesterEntry(jakobMissionPathDict["2_1"], Keys.A, standardEquip: 2));
            campaignEntries.Add(new LevelTesterEntry(jakobMissionPathDict["2_2"], Keys.A, standardEquip: 2));
            campaignEntries.Add(new LevelTesterEntry(jakobMissionPathDict["3_1"], Keys.A, standardEquip: 3));
            campaignEntries.Add(new LevelTesterEntry(jakobMissionPathDict["3_2"], Keys.A, standardEquip: 3));

            //campaignEntries.Add(new LevelTesterEntry(jakobMissionPathDict["4_1"], "4 - Infiltration (1)", Keys.A, standardEquip: 4));
            campaignEntries.Add(new LevelTesterEntry(jakobMissionPathDict["4_2"], Keys.S, standardEquip: 4));
            campaignEntries.Add(new LevelTesterEntry(jakobMissionPathDict["5_1"], Keys.D, standardEquip: 5));
            campaignEntries.Add(new LevelTesterEntry(jakobMissionPathDict["5_2"], Keys.F, standardEquip: 5));
            campaignEntries.Add(new LevelTesterEntry(jakobMissionPathDict["6_1"], Keys.G, standardEquip: 6));
            campaignEntries.Add(new LevelTesterEntry(jakobMissionPathDict["6_2"], Keys.H, standardEquip: 6));
            campaignEntries.Add(new LevelTesterEntry(jakobMissionPathDict["7_1"], Keys.J, standardEquip: 6));

            campaignEntries.Add(new LevelTesterEntry(jakobMissionPathDict["8o_1"], Keys.K, standardEquip: 7));
            campaignEntries.Add(new LevelTesterEntry(jakobMissionPathDict["8o_2"], Keys.L, standardEquip: 7));
            campaignEntries.Add(new LevelTesterEntry(jakobMissionPathDict["8r_1"], Keys.K, standardEquip: 7));
            campaignEntries.Add(new LevelTesterEntry(jakobMissionPathDict["8r_2"], Keys.L, standardEquip: 7));
            campaignEntries.Add(new LevelTesterEntry(jakobMissionPathDict["8a_1"], Keys.K, standardEquip: 7));
            campaignEntries.Add(new LevelTesterEntry(jakobMissionPathDict["8a_2"], Keys.L, standardEquip: 7));
        }
コード例 #3
0
        public void Initialize()
        {
            gameStates = new List <GameState>();

            mainMenuState      = new MainMenuState(Game, "MainMenuState");
            startGameState     = new StartGameState(Game, "StartGameState");
            optionsMenuState   = new OptionsMenuState(Game, "OptionsMenuState");
            helpScreenState    = new HelpScreenState(Game, "HelpScreenState");
            introFirstState    = new IntroFirstState(Game, "IntroFirstState");
            introSecondState   = new IntroSecondState(Game, "IntroSecondState");
            outroState         = new OutroState(Game, "OutroState");
            overworldState     = new OverworldState(Game, "OverworldState");
            mapCreatorState    = new MapCreatorState(Game, "MapCreatorState");
            shooterState       = new ShooterState(Game, "ShooterState");
            shipManagerState   = new ShipManagerState(Game, "ShipManagerState");
            planetState        = new PlanetState(Game, "PlanetState");
            stationState       = new StationState(Game, "StationState");
            missionScreenState = new MissionScreenState(Game, "MissionScreenState");
            creditState        = new CreditState(Game, "CreditState");

            levelTesterState = new LevelTesterState(Game, "LevelTesterState");
            campaignState    = new CampaignState(Game, "CampaignState");

            gameStates.Add(mainMenuState);
            gameStates.Add(startGameState);
            gameStates.Add(optionsMenuState);
            gameStates.Add(helpScreenState);
            gameStates.Add(introFirstState);
            gameStates.Add(introSecondState);
            gameStates.Add(outroState);
            gameStates.Add(overworldState);
            gameStates.Add(shooterState);
            gameStates.Add(shipManagerState);
            gameStates.Add(planetState);
            gameStates.Add(stationState);
            gameStates.Add(missionScreenState);
            gameStates.Add(mapCreatorState);
            gameStates.Add(creditState);

            gameStates.Add(levelTesterState);
            gameStates.Add(campaignState);

            mainMenuState.Initialize();
            startGameState.Initialize();
            optionsMenuState.Initialize();
            helpScreenState.Initialize();
            introFirstState.Initialize();
            introSecondState.Initialize();
            outroState.Initialize();
            mapCreatorState.Initialize();

            overworldState.Initialize();
            shooterState.Initialize();
            shipManagerState.Initialize();
            planetState.Initialize();
            stationState.Initialize();
            missionScreenState.Initialize();

            creditState.Initialize();
            levelTesterState.Initialize();
            campaignState.Initialize();

            ChangeState("MainMenuState");
        }
コード例 #4
0
        public ShooterState(Game1 Game, String name) :
            base(Game, name)
        {
            this.Game = Game;
            Class     = "play";

            //Load texture
            spriteSheet = new Sprite(Game.Content.Load <Texture2D>("Vertical-Sprites/shooterSheet"));

            //Player
            player = new PlayerVerticalShooter(Game, spriteSheet);

            // Create new log file
            LevelLogger.InitializeNewLogfile();

            // Unsure about if this is to be used, seems like a nice idea though! // Jakob
            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, "LonelyAsteroidEncounter", "LonelyAsteroidLevel", MissionType.none));

            //////////// USED LEVELS //////////////

            var levelDict = ShooterState.GetMissionPathDict();

            // Subinteractive

            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, levelDict["sub1"]));

            //Pirate Levels
            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, levelDict["rp1"]));
            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, levelDict["rp2"]));
            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, levelDict["rp3"]));
            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, levelDict["rp4"]));
            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, levelDict["rp5"]));

            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, levelDict["ap1"]));
            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, levelDict["ap2"]));
            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, levelDict["ap3"]));
            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, levelDict["ap4"]));
            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, levelDict["ap5"]));

            levels.Add(new HangarLevel(Game, spriteSheet, player, levelDict["hangar1"]));
            levels.Add(new HangarLevel(Game, spriteSheet, player, levelDict["hangar2"]));
            levels.Add(new HangarLevel(Game, spriteSheet, player, levelDict["hangar3"]));

            // Side mission levels

            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, levelDict["s_flightTraining_1"]));
            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, levelDict["s_flightTraining_2"]));
            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, levelDict["s_flightTraining_3"]));
            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, levelDict["s_ft2_1"]));
            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, levelDict["s_ft2_2"]));
            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, levelDict["s_ft2_3"]));
            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, levelDict["s_ft2_4"]));
            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, levelDict["s_ft2_5"]));

            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, levelDict["s_deathByMeteor"]));
            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, levelDict["s_astroScan"]));
            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, levelDict["s_astroDodger"]));
            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, levelDict["s_theRebelOutpost_1"]));
            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, levelDict["s_theRebelOutpost_2"]));

            // Main mission levels
            levels.Add(new RebelsInTheMeteors(Game, spriteSheet, player, levelDict["1_1"]));
            levels.Add(new SecondMissionLevel(Game, spriteSheet, player, levelDict["2_1"]));
            levels.Add(new SecondMissionLevel(Game, spriteSheet, player, levelDict["2_2"]));
            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, levelDict["3_1"]));
            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, levelDict["3_2"]));
            levels.Add(new Infiltration1Level(Game, spriteSheet, player, levelDict["4_1"]));
            levels.Add(new Infiltration2Level(Game, spriteSheet, player, levelDict["4_2"]));
            levels.Add(new Retaliation1Level(Game, spriteSheet, player, levelDict["5_1"]));
            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, levelDict["5_2"]));
            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, levelDict["6_1"]));
            levels.Add(new InTheNameOfScienceLevel2(Game, spriteSheet, player, levelDict["6_2"]));
            levels.Add(new Information1Level(Game, spriteSheet, player, levelDict["7_1"]));
            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, levelDict["8o_1"]));
            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, levelDict["8o_2"]));
            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, levelDict["8r_1"]));
            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, levelDict["8r_2"]));
            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, levelDict["8a_1"]));
            levels.Add(new MapCreatorLevel(Game, spriteSheet, player, levelDict["8a_2"]));
        }