Exemple #1
0
            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);
            }
Exemple #2
0
 public static ExplosionHelper.Surface[] Build(ref ExplosionHelper.Point.Enumerator point_enumerator)
 {
     ExplosionHelper.Point.EnumeratorToArray pointEnumerator = new ExplosionHelper.Point.EnumeratorToArray();
     pointEnumerator.enumerator = point_enumerator;
     pointEnumerator.length     = 0;
     pointEnumerator.array      = null;
     pointEnumerator.RecurseInStackHeapToArray();
     return(pointEnumerator.array);
 }
 public static ExplosionHelper.Surface[] Build(ref ExplosionHelper.Point.Enumerator point_enumerator)
 {
     ExplosionHelper.Point.EnumeratorToArray array;
     array.enumerator = point_enumerator;
     array.length = 0;
     array.array = null;
     array.RecurseInStackHeapToArray();
     return array.array;
 }
Exemple #4
0
 public ExplosionHelper.Surface[] ToArray()
 {
     ExplosionHelper.Point.Enumerator enumerator = new ExplosionHelper.Point.Enumerator(this, true);
     return(ExplosionHelper.Point.EnumeratorToArray.Build(ref enumerator));
 }