Example #1
0
        /// <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);

            worldMap.loadContent(Content, graphics.PreferredBackBufferHeight, graphics.PreferredBackBufferWidth);
            worldMap.loadMap("content/worldMap.txt");

            currentMap = worldMap;

            currentPlayer = new Player(Content);

            zombies.Add(new Zombie(Content, new Vector2(450, 450)));

            font = Content.Load <SpriteFont>("SpriteFont1");

            soundOhNo         = Content.Load <SoundEffect>("ohNo");
            soundOhNoInstance = soundOhNo.CreateInstance();

            conMenu = new ConstructionMenu(new Vector2(0, 0), Content, currentPlayer.getInventory(), currentMap, currentPlayer);


            //inv.addToInventory(resource.resourceTypes.Hatchet, 1);


            // TODO: use this.Content to load your game content here
        }