Ejemplo n.º 1
0
 public void Draw(SpriteBatch spriteBatch, TextureList textureList)
 {
     if (selected)
     {
         spriteBatch.Draw(textureList.Get("character-selected"), position, Color.White);
     }
     else
     {
         spriteBatch.Draw(textureList.Get("character"), position, Color.White);
     }
 }
Ejemplo n.º 2
0
        public Map(SpriteBatch spriteBatch, TextureList newTextureList, Viewport viewport)
        {
            textureList = newTextureList;
            tileList = new List<Tile>();

            for (int x = 0; x < (viewport.Width) / 32; x++)
            {
                for (int y = 0; y < (viewport.Height - 128) / 32; y++)
                {
                    if ((x == 3 && y < 10) || (x > 2 && x < 4 && y > 4 && y < 10))
                    {
                        Tile mountainTile = new Tile(textureList.Get("tile-mountain"), new Vector2(x * 32, y * 32));
                        mountainTile.restricted = true;
                        tileList.Add(mountainTile);
                    }
                    else
                    {
                        Tile grassTile = new Tile(textureList.Get("tile-grass"), new Vector2(x * 32, y * 32));
                        tileList.Add(grassTile);
                    }
                }
            }
        }
Ejemplo n.º 3
0
 public void Draw(SpriteBatch spriteBatch, TextureList textureList)
 {
     spriteBatch.Draw(textureList.Get("title-screen"), new Vector2(0, 0), Color.White);
 }
Ejemplo n.º 4
0
 public void Draw(SpriteBatch spriteBatch, TextureList textureList)
 {
     foreach (Tile tile in tileList)
     {
         if (tile.isPath)
         {
             spriteBatch.Draw(textureList.Get("tile-grass-path"), tile.position, Color.White);
         }
         else
         {
             spriteBatch.Draw(tile.texture, tile.position, Color.White);
         }
     }
 }