public GameMapData GetGameMapData() { var data = new GameMapData(Width, Height); for (int x = 0; x < Width; x++) { for (int y = 0; y < Height; y++) { int tileIndex = floor[x, y] ? 0 : 1; //TODO: add proper indices and tilesets. data.Set(x, y, tileIndex); } } return(data); }
public GameMapData GetMapData() { GameMapData data = new GameMapData(Width, Height); for (int x = 0; x < Width; x++) { for (int y = 0; y < Height; y++) { int tile = tilemap.GetTile(x, y) == floorBrush ? 0 : 1; data.Set(x, y, tile); } } return(data); }