protected override void LoadContent() { if (!this.m_contentLoaded) { this.m_contentLoaded = true; this.LoadAllSpriteFonts(); this.LoadAllEffects(); this.LoadAllSpritesheets(); SoundManager.Initialize("Content\\Audio\\RogueCastleXACTProj.xgs"); SoundManager.LoadWaveBank("Content\\Audio\\SFXWaveBank.xwb", false); SoundManager.LoadWaveBank("Content\\Audio\\MusicWaveBank.xwb", true); SoundManager.LoadSoundBank("Content\\Audio\\SFXSoundBank.xsb", false); SoundManager.LoadSoundBank("Content\\Audio\\MusicSoundBank.xsb", true); SoundManager.GlobalMusicVolume = Game.GameConfig.MusicVolume; SoundManager.GlobalSFXVolume = Game.GameConfig.SFXVolume; if (InputManager.GamePadIsConnected(PlayerIndex.One)) { InputManager.SetPadType(PlayerIndex.One, PadTypes.GamePad); } InputManager.UseDirectInput = Game.GameConfig.EnableDirectInput; Game.GenericTexture = new Texture2D(base.GraphicsDevice, 1, 1); Game.GenericTexture.SetData<Color>(new Color[] { Color.White }); if (!LevelEV.LOAD_SPLASH_SCREEN) { LevelBuilder2.Initialize(); LevelParser.ParseRooms("Map_1x1", base.Content, false); LevelParser.ParseRooms("Map_1x2", base.Content, false); LevelParser.ParseRooms("Map_1x3", base.Content, false); LevelParser.ParseRooms("Map_2x1", base.Content, false); LevelParser.ParseRooms("Map_2x2", base.Content, false); LevelParser.ParseRooms("Map_2x3", base.Content, false); LevelParser.ParseRooms("Map_3x1", base.Content, false); LevelParser.ParseRooms("Map_3x2", base.Content, false); LevelParser.ParseRooms("Map_Special", base.Content, false); LevelParser.ParseRooms("Map_DLC1", base.Content, true); LevelBuilder2.IndexRoomList(); } SkillSystem.Initialize(); AreaStruct 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 }; AreaStruct 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 }; AreaStruct 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 }; AreaStruct 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 }; AreaStruct 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 }; AreaStruct 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; AreaStruct 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; AreaStruct 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; Game.Area1List = new AreaStruct[] { areaStruct, areaStruct2, areaStruct3, areaStruct4 }; if (LevelEV.RUN_DEMO_VERSION) { Game.Area1List = new AreaStruct[] { areaStruct5 }; } } }
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 }; } } }