Beispiel #1
0
 private void LoadLevelData()
 {
     lock (this)
     {
         LevelBuilder2.Initialize();
         LevelParser.ParseRooms("Map_1x1", ScreenManager.Game.Content);
         LevelParser.ParseRooms("Map_1x2", ScreenManager.Game.Content);
         LevelParser.ParseRooms("Map_1x3", ScreenManager.Game.Content);
         LevelParser.ParseRooms("Map_2x1", ScreenManager.Game.Content);
         LevelParser.ParseRooms("Map_2x2", ScreenManager.Game.Content);
         LevelParser.ParseRooms("Map_2x3", ScreenManager.Game.Content);
         LevelParser.ParseRooms("Map_3x1", ScreenManager.Game.Content);
         LevelParser.ParseRooms("Map_3x2", ScreenManager.Game.Content);
         LevelParser.ParseRooms("Map_Special", ScreenManager.Game.Content);
         LevelParser.ParseRooms("Map_DLC1", ScreenManager.Game.Content, true);
         LevelBuilder2.IndexRoomList();
         m_levelDataLoaded = true;
     }
 }
Beispiel #2
0
 protected override void LoadContent()
 {
     if (!m_contentLoaded)
     {
         m_contentLoaded = true;
         LoadAllSpriteFonts();
         LoadAllEffects();
         LoadAllSpritesheets();
         SoundManager.Initialize("Content\\Audio\\RogueCastleXACTProj.xgs");
         SoundManager.LoadWaveBank("Content\\Audio\\SFXWaveBank.xwb");
         SoundManager.LoadWaveBank("Content\\Audio\\MusicWaveBank.xwb", true);
         SoundManager.LoadSoundBank("Content\\Audio\\SFXSoundBank.xsb");
         SoundManager.LoadSoundBank("Content\\Audio\\MusicSoundBank.xsb", true);
         SoundManager.GlobalMusicVolume = GameConfig.MusicVolume;
         SoundManager.GlobalSFXVolume   = GameConfig.SFXVolume;
         if (InputManager.GamePadIsConnected(PlayerIndex.One))
         {
             InputManager.SetPadType(PlayerIndex.One, PadTypes.GamePad);
         }
         InputManager.UseDirectInput = GameConfig.EnableDirectInput;
         GenericTexture = new Texture2D(GraphicsDevice, 1, 1);
         GenericTexture.SetData(new[]
         {
             Color.White
         });
         if (!LevelEV.LOAD_SPLASH_SCREEN)
         {
             LevelBuilder2.Initialize();
             LevelParser.ParseRooms("Map_1x1", Content);
             LevelParser.ParseRooms("Map_1x2", Content);
             LevelParser.ParseRooms("Map_1x3", Content);
             LevelParser.ParseRooms("Map_2x1", Content);
             LevelParser.ParseRooms("Map_2x2", Content);
             LevelParser.ParseRooms("Map_2x3", Content);
             LevelParser.ParseRooms("Map_3x1", Content);
             LevelParser.ParseRooms("Map_3x2", Content);
             LevelParser.ParseRooms("Map_Special", Content);
             LevelParser.ParseRooms("Map_DLC1", Content, true);
             LevelBuilder2.IndexRoomList();
         }
         SkillSystem.Initialize();
         var areaStruct = new AreaStruct
         {
             Name        = "The Grand Entrance",
             LevelType   = GameTypes.LevelType.CASTLE,
             TotalRooms  = new Vector2(24f, 28f),
             BossInArea  = true,
             SecretRooms = new Vector2(1f, 3f),
             BonusRooms  = new Vector2(2f, 3f),
             Color       = Color.White
         };
         var areaStruct2 = new AreaStruct
         {
             LevelType   = GameTypes.LevelType.GARDEN,
             TotalRooms  = new Vector2(23f, 27f),
             BossInArea  = true,
             SecretRooms = new Vector2(1f, 3f),
             BonusRooms  = new Vector2(2f, 3f),
             Color       = Color.Green
         };
         var areaStruct3 = new AreaStruct
         {
             LevelType   = GameTypes.LevelType.TOWER,
             TotalRooms  = new Vector2(23f, 27f),
             BossInArea  = true,
             SecretRooms = new Vector2(1f, 3f),
             BonusRooms  = new Vector2(2f, 3f),
             Color       = Color.DarkBlue
         };
         var areaStruct4 = new AreaStruct
         {
             LevelType   = GameTypes.LevelType.DUNGEON,
             TotalRooms  = new Vector2(23f, 27f),
             BossInArea  = true,
             SecretRooms = new Vector2(1f, 3f),
             BonusRooms  = new Vector2(2f, 3f),
             Color       = Color.Red
         };
         var areaStruct5 = new AreaStruct
         {
             Name        = "The Grand Entrance",
             LevelType   = GameTypes.LevelType.CASTLE,
             TotalRooms  = new Vector2(24f, 27f),
             BossInArea  = true,
             SecretRooms = new Vector2(2f, 3f),
             BonusRooms  = new Vector2(2f, 3f),
             Color       = Color.White
         };
         var areaStruct6 = default(AreaStruct);
         areaStruct6.Name        = "The Grand Entrance";
         areaStruct6.LevelType   = GameTypes.LevelType.GARDEN;
         areaStruct6.TotalRooms  = new Vector2(12f, 14f);
         areaStruct6.BossInArea  = true;
         areaStruct6.SecretRooms = new Vector2(2f, 3f);
         areaStruct6.BonusRooms  = new Vector2(1f, 2f);
         areaStruct6.Color       = Color.Green;
         var areaStruct7 = default(AreaStruct);
         areaStruct7.Name        = "The Grand Entrance";
         areaStruct7.LevelType   = GameTypes.LevelType.DUNGEON;
         areaStruct7.TotalRooms  = new Vector2(12f, 14f);
         areaStruct7.BossInArea  = true;
         areaStruct7.SecretRooms = new Vector2(2f, 3f);
         areaStruct7.BonusRooms  = new Vector2(1f, 2f);
         areaStruct7.Color       = Color.Red;
         var areaStruct8 = default(AreaStruct);
         areaStruct8.Name        = "The Grand Entrance";
         areaStruct8.LevelType   = GameTypes.LevelType.TOWER;
         areaStruct8.TotalRooms  = new Vector2(12f, 14f);
         areaStruct8.BossInArea  = true;
         areaStruct8.SecretRooms = new Vector2(2f, 3f);
         areaStruct8.BonusRooms  = new Vector2(1f, 2f);
         areaStruct8.Color       = Color.DarkBlue;
         Area1List = new[]
         {
             areaStruct,
             areaStruct2,
             areaStruct3,
             areaStruct4
         };
         if (LevelEV.RUN_DEMO_VERSION)
         {
             Area1List = new[]
             {
                 areaStruct5
             };
         }
     }
 }