Ejemplo n.º 1
0
 public Map(int width, int height, char[,] charMap)
 {
     tileMap = new Tile[width, height];
     for (int y = 0; y < tileMap.GetLength(0); y++)
     {
         for (int x = 0; x < tileMap.GetLength(0); x++)
             tileMap[x, y] = new Tile(x * Tile.SIZE, y * Tile.SIZE, Globals.tileTable.Get(charMap[x, y]));
     }
 }
        private bool IsPassable(Tile tile)
        {
            if (tile == null)
                return false;

            if (tile.GetTileType() != ETileType.WALL && tile.GetTileType() != ETileType.CRATE)
                return true;
            else
                return false;
        }