/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); MazeOptions options = new MazeOptions( new Vector2(1, 3), 23, 16, Content.Load <Texture2D>("Textures/Objects/SoftProDollar")); _maze = new Maze(graphics.GraphicsDevice, options); MazeRunnerOptions runnerOptions = new MazeRunnerOptions( _maze, Content.Load <Texture2D>("Textures/Players/John/CloseupSmall"), Content.Load <SoundEffect>("Audio/Effects/SoftProDollarCollected"), 100); _runner = new MazeRunner(this, runnerOptions); _boss = new MazeBoss( Content.Load <Texture2D>("Textures/Objects/Boss"), new Vector2(0, 0), new Vector2(800, 0), new TimeSpan(0, 1, 0), Content.Load <Texture2D>("Textures/Objects/ConferenceRoom")); }
/// <summary> /// Initializes a new instance of the <see cref="MazeRunner"/> class. /// </summary> /// <param name="game">The game.</param> /// <param name="texture">The texture.</param> /// <param name="maze">The maze.</param> public MazeRunner(Game game, MazeRunnerOptions options) { this._nintendoController = new NintendoController(game); this._maze = options.Maze; this._texture = options.Texture; this._dollarSound = options.DollarSound; this._dollarValue = options.DollarValue; this._currentCell = this._maze.StartingCell; }