Пример #1
0
        public MapLayerData(string mapLayerName, int width, int height, int tileIndex, int tileSet)
        {
            MapLayerName = mapLayerName;
            Width = width;
            Height = height;

            Layer = new TileData[height * width];

            TileData tile = new TileData(tileIndex, tileSet);

            for (int y = 0; y < height; y++)
                for (int x = 0; x < width; x++)
                    SetTile(x, y, tile);
        }
Пример #2
0
 public void SetTile(int x, int y, int tileIndex, int tileSet)
 {
     Layer[y * Width + x] = new TileData(tileIndex, tileSet);
 }
Пример #3
0
 public void SetTile(int x, int y, TileData tile)
 {
     Layer[y * Width + x] = tile;
 }