public MapLayer(int width, int height)
        {
            map = new Tile[height, width];

            for (int y = 0; y < height; y++)
            {
                for (int x = 0; x < width; x++)
                {
                    map[y, x] = new Tile(0, 0);
                }
            }
        }
 public void SetTile(int x, int y, int tileIndex, int tileset)
 {
     map[y, x] = new Tile(tileIndex, tileset);
 }
 public void SetTile(int x, int y, Tile tile)
 {
     map[y, x] = tile;
 }
 public MapLayer(Tile[,] map)
 {
     this.map = (Tile[,])map.Clone();
 }