private void InitCells(int tile) { Cells = new MemMapPoint[ColumnCount,RowCount]; tiles = new AutoDictionary<int, int>(); for (int i = 0; i < ColumnCount; i++) { for (int j = 0; j < RowCount; j++) { int tarTile = bMap.Cells[i, j]; if (tarTile == 0) { tarTile = tile == 0 ? TileConfig.Indexer.DefaultTile : tile; } Cells[i, j] = new MemMapPoint(i, i*CardSize, j*CardSize, ColumnCount, tarTile); tiles[tarTile == TileConfig.Indexer.DefaultTile ? 0 : tarTile]++; } } }
private void InitCells(int tile) { Cells = new MemMapPoint[ColumnCount, RowCount]; tiles = new AutoDictionary <int, int>(); for (int i = 0; i < ColumnCount; i++) { for (int j = 0; j < RowCount; j++) { int tarTile = bMap.Cells[i, j]; if (tarTile == 0) { tarTile = tile == 0 ? TileConfig.Indexer.DefaultTile : tile; } Cells[i, j] = new MemMapPoint(i, i * CardSize, j * CardSize, ColumnCount, tarTile); tiles[tarTile == TileConfig.Indexer.DefaultTile ? 0 : tarTile]++; } } }