Ejemplo n.º 1
0
        // Misc methods //

        private void WriteLogEntry()
        {
            String timeString = DateTime.Now.ToString("HH:mm:ss tt");

            LevelLogger.WriteLine("------------------------");
            LevelLogger.WriteLine(String.Format("Level\t{0}", Identifier));
            LevelLogger.WriteLine(String.Format("LoggingTime\t{0}", timeString));
            LevelLogger.WriteLine(String.Format("LevelRuntime\t{0}", playTime));
            LevelLogger.WriteLine(String.Format("ObjectiveCompleted\t{0}", IsObjectiveCompleted));

            LevelLogger.WriteLine("");

            LevelLogger.WriteLine(String.Format("Ship damage\t{0}", RetrieveAccumulatedShipDamage()));
            LevelLogger.WriteLine(String.Format("Shield damage\t{0}", RetrieveAccumulatedShieldDamage()));
            LevelLogger.WriteLine(String.Format("Consumed energy\t{0}", RetrieveTotalConsumedEnergy()));

            LevelLogger.WriteLine("");

            LevelLogger.WriteLine(String.Format("Primary1\t{0}", ShipInventoryManager.equippedPrimaryWeapons[0].Name));
            LevelLogger.WriteLine(String.Format("Primary2\t{0}", ShipInventoryManager.equippedPrimaryWeapons[1].Name));
            LevelLogger.WriteLine(String.Format("Secondary\t{0}", ShipInventoryManager.equippedSecondary.Name));
            LevelLogger.WriteLine(String.Format("Cell\t{0}", ShipInventoryManager.equippedEnergyCell.Name));
            LevelLogger.WriteLine(String.Format("Shield\t{0}", ShipInventoryManager.equippedShield.Name));
            LevelLogger.WriteLine(String.Format("Hull\t{0}", ShipInventoryManager.equippedPlating.Name));
        }
Ejemplo n.º 2
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"]));
        }