Struct ListRegionsEnumerator<T>
Iterate through a region list.
public struct ListRegionsEnumerator<T> : IEnumerable<T>, IEnumerable, IEnumerator<T>, IEnumerator, IDisposable
Type Parameters
T
- Implements
-
IEnumerable<T>IEnumerator<T>
- Inherited Members
- Extension Methods
Remarks
Stolen from DevkitServer.
Constructors
ListRegionsEnumerator(List<T>[,])
public ListRegionsEnumerator(List<T>[,] regions)
Parameters
regionsList<T>[,]
ListRegionsEnumerator(List<T>[,], byte, byte, byte)
public ListRegionsEnumerator(List<T>[,] regions, byte centerX, byte centerY, byte maxRegionDistance = 255)
Parameters
Fields
Coordinate
public RegionCoord Coordinate
Field Value
- RegionCoord
Properties
Current
Gets the element in the collection at the current position of the enumerator.
public T Current { get; }
Property Value
- T
The element in the collection at the current position of the enumerator.
Index
public int Index { get; }
Property Value
Region
public List<T>? Region { get; }
Property Value
- List<T>
Regions
public List<T>[,] Regions { get; }
Property Value
- List<T>[,]
Methods
GetEnumerator()
public readonly ListRegionsEnumerator<T> GetEnumerator()
Returns
MoveNext()
Advances the enumerator to the next element of the collection.
public bool MoveNext()
Returns
- bool
true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.
Exceptions
- InvalidOperationException
The collection was modified after the enumerator was created.
Reset()
Sets the enumerator to its initial position, which is before the first element in the collection.
public void Reset()
Exceptions
- InvalidOperationException
The collection was modified after the enumerator was created.