public override IEnumerator <Point> GetEnumerator() { for (var gridIndex = MinIndex; gridIndex <= MaxIndex; gridIndex++) { yield return(TileMap1D.GetTile(gridIndex, GridWidth)); } }
public override Point this[int index] { get { if (index < 0 || index >= Count) { throw new ArgumentOutOfRangeException(nameof(index)); } return(TileMap1D.GetTile(index, GridWidth)); } }
public override Point this[int index] { get { if (index < 0 || index >= Count) { throw new ArgumentOutOfRangeException(nameof(index)); } var point = TileMap1D.GetTile(index, Size.Width); return(Point.Add(Origin, (Size)point)); } }