public bool MoveNext() { Label0: while (this.inInstanceEnumerator) { if ((this._immediate || this.output) && this.overlapEnumerator.MoveNext()) { MeshBatchInstance current = this.overlapEnumerator.Current; if (this.IN.SurfaceForMeshBatchInstance(current, ref this.current)) { return(true); } } else { this.overlapEnumerator.Dispose(); this.overlapEnumerator = null; this.inInstanceEnumerator = false; this.output = null; } } ExplosionHelper.Point.Enumerator enumerator = this; int num = enumerator.colliderIndex; int num1 = num; enumerator.colliderIndex = num + 1; if (num1 == -1) { Vector3 n = this.IN.point; float single = this.IN.blastRadius; ExplosionHelper.Point points = this.IN; this.overlap = Physics.OverlapSphere(n, single, points.overlapLayerMask); } while (this.colliderIndex < (int)this.overlap.Length) { if (this._immediate || this.overlap[this.colliderIndex]) { if (this.overlap[this.colliderIndex].GetMeshBatchPhysicalOutput <Facepunch.MeshBatch.MeshBatchPhysicalOutput>(out this.output)) { this.inInstanceEnumerator = true; Facepunch.MeshBatch.MeshBatchPhysicalOutput meshBatchPhysicalOutput = this.output; Vector3 vector3 = this.IN.point; ExplosionHelper.Point n1 = this.IN; this.overlapEnumerator = meshBatchPhysicalOutput.EnumerateOverlapSphereInstances(vector3, n1.blastRadius).GetEnumerator(); goto Label0; } else if (this.IN.SurfaceForCollider(this.overlap[this.colliderIndex], ref this.current)) { return(true); } } ExplosionHelper.Point.Enumerator enumerator1 = this; enumerator1.colliderIndex = enumerator1.colliderIndex + 1; } this.colliderIndex = (int)this.overlap.Length; this.current = new ExplosionHelper.Surface(); return(false); }
internal Enumerator(ref ExplosionHelper.Point point, bool immediate) { this._immediate = immediate; this.IN = point; this.colliderIndex = -1; this.inInstanceEnumerator = false; this.overlapEnumerator = null; this.output = null; this.overlap = null; this.current = new ExplosionHelper.Surface(); }
public void Dispose() { this.colliderIndex = -1; if (this.inInstanceEnumerator) { this.inInstanceEnumerator = false; this.overlapEnumerator.Dispose(); } this.overlapEnumerator = null; this.output = null; this.overlap = null; this.current = new ExplosionHelper.Surface(); }