public Level(GameLoop game, ArrayList _textures, ArrayList _fonts, ArrayList _sounds, LevelLoader loader) : base(game) { int screenWidth = Game.GraphicsDevice.Viewport.Width; int screenHeight = Game.GraphicsDevice.Viewport.Height; bolts = new List<Bolt>(); playerRange = new Rectangle((screenWidth * 2)/5, 0, screenWidth/5, screenHeight); levelLoader = loader; textures = _textures; sounds = _sounds; currentLevel = 0; deathCounter = 0; screenWidth = Game.GraphicsDevice.Viewport.Width; screenHeight = Game.GraphicsDevice.Viewport.Height; gameTimer = new GameTimer(360, (SpriteFont)_fonts[0]); InitLevel(); }
public Level(GameLoop game, ArrayList _textures, ArrayList _fonts, ArrayList _sounds, MusicManager _musicPlayer, PlotScreen _plotScreen, LevelLoader loader, InputHandler _inputHandler) : base(game) { int screenWidth = Game.GraphicsDevice.Viewport.Width; int screenHeight = Game.GraphicsDevice.Viewport.Height; bolts = new List<Bolt>(); torches = new List<Torch>(); guards = new List<IGuard>(); levers = new List<Lever>(); gates = new List<Gate>(); boxBolts = new List<BoxOfBolts>(); buttons = new List<Button>(); spouts = new List<Spout>(); playerRange = new Rectangle((screenWidth * 2) / 5, 0, screenWidth / 5, screenHeight); levelLoader = loader; textures = _textures; sounds = _sounds; fonts = _fonts; musicPlayer = _musicPlayer; plotScreen = _plotScreen; guardFactory = new GuardFactory((Texture2D)textures[wizardIndex], (Texture2D)textures[soldierIndex], (Texture2D)textures[LOSIndex]); currentLevel = 0; deathCounter = 0; screenWidth = Game.GraphicsDevice.Viewport.Width; screenHeight = Game.GraphicsDevice.Viewport.Height; this.game = game; inputHandler = _inputHandler; levelLoader.LoadLevel(currentLevel); }