public Game1() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; CaveMap = new Objects.MapList<Entities.ComplexTerrainEntity>(10, 10); graphics.PreferredBackBufferHeight = 500; graphics.PreferredBackBufferWidth = 500; }
/// <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); Genero.Generators.CaveGenerator CaveGen = new Generators.CaveGenerator(Content); CaveMap = CaveGen.GenerateMap(); // TODO: use this.Content to load your game content here }
/// <summary> /// Allows the game to run logic such as updating the world, /// checking for collisions, gathering input, and playing audio. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Update(GameTime gameTime) { // Allows the game to exit if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed) this.Exit(); if (Keyboard.GetState(PlayerIndex.One).IsKeyDown(Keys.A)) { Genero.Generators.CaveGenerator CaveGen = new Generators.CaveGenerator(Content); CaveMap = CaveGen.GenerateMap(); } // TODO: Add your update logic here base.Update(gameTime); }