Ejemplo n.º 1
0
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);
            assets.font = Content.Load <SpriteFont>("game_font");
            map.ReadMap(@"C:\Users\jules\source\repos\Platformer\Platformer\map.txt");

            for (int i = 0; i <= 18; i++)
            {
                string id = i.ToString();
                if (i < 10)
                {
                    id = "0" + i.ToString();
                }
                assets.tiles_textures.Add(this.Content.Load <Texture2D>("tile_" + id));
            }

            for (int i = 0; i <= 5; i++)
            {
                assets.player_textures.Add(this.Content.Load <Texture2D>("player_" + i.ToString()));
            }
        }