Exemplo n.º 1
0
            public bool MoveNext()
            {
                var localGridBlock = gridBlock;
                var blockSize      = localGridBlock.BlockSize;
                var blockLocation  = localGridBlock.Location;

                if (index < localGridBlock.cells.Length)
                {
                    var currentCell = localGridBlock.cells[index];
                    int x, y;

                    GridBlock.GetCellLocation(ref index, ref blockSize, ref blockLocation, out x, out y);

                    current = new CellLocationPair <TCell>(currentCell, x, y);

                    index++;

                    return(true);
                }

                return(false);
            }
Exemplo n.º 2
0
 public Enumerator(GridBlock <TCell> gridBlock)
 {
     index          = 0;
     current        = default(CellLocationPair <TCell>);
     this.gridBlock = gridBlock;
 }
Exemplo n.º 3
0
 public void Reset()
 {
     index   = 0;
     current = default(CellLocationPair <TCell>);
 }