コード例 #1
0
        public override IEnumerable Regenerate()
        {
            IEnumerator enumerator = base.Regenerate().GetEnumerator();

            try
            {
                while (enumerator.MoveNext())
                {
                    object result = enumerator.Current;
                    yield return(result);
                }
            }
            finally
            {
                IDisposable disposable;
                if ((disposable = (enumerator as IDisposable)) != null)
                {
                    disposable.Dispose();
                }
            }
            Vector3 planetViewCenter = Find.WorldGrid.viewCenter;
            float   planetViewAngle  = Find.WorldGrid.viewAngle;

            if (planetViewAngle < 180f)
            {
                List <Vector3> collection;
                List <int>     collection2;
                SphereGenerator.Generate(4, 99.85f, -planetViewCenter, 180f - Mathf.Min(planetViewAngle, 180f) + 10f, out collection, out collection2);
                LayerSubMesh subMesh = base.GetSubMesh(WorldMaterials.UngeneratedPlanetParts);
                subMesh.verts.AddRange(collection);
                subMesh.tris.AddRange(collection2);
            }
            base.FinalizeMesh(MeshParts.All);
            yield break;
        }
コード例 #2
0
        public override IEnumerable Regenerate()
        {
            IEnumerator enumerator = base.Regenerate().GetEnumerator();

            try
            {
                while (enumerator.MoveNext())
                {
                    object result = enumerator.Current;
                    yield return(result);
                }
            }
            finally
            {
                IDisposable disposable;
                if ((disposable = (enumerator as IDisposable)) != null)
                {
                    disposable.Dispose();
                }
            }
            List <Vector3> tmpVerts;
            List <int>     tmpIndices;

            SphereGenerator.Generate(4, 108.1f, Vector3.forward, 360f, out tmpVerts, out tmpIndices);
            LayerSubMesh subMesh = base.GetSubMesh(WorldMaterials.PlanetGlow);

            subMesh.verts.AddRange(tmpVerts);
            subMesh.tris.AddRange(tmpIndices);
            base.FinalizeMesh(MeshParts.All);
            yield break;
        }
コード例 #3
0
        public override IEnumerable Regenerate()
        {
            IEnumerator enumerator = base.Regenerate().GetEnumerator();

            try
            {
                if (enumerator.MoveNext())
                {
                    object result = enumerator.Current;
                    yield return(result);

                    /*Error: Unable to find new state assignment for yield return*/;
                }
            }
            finally
            {
                IDisposable disposable;
                IDisposable disposable2 = disposable = (enumerator as IDisposable);
                if (disposable != null)
                {
                    disposable2.Dispose();
                }
            }
            SphereGenerator.Generate(4, 108.1f, Vector3.forward, 360f, out List <Vector3> tmpVerts, out List <int> tmpIndices);
            LayerSubMesh subMesh = GetSubMesh(WorldMaterials.PlanetGlow);

            subMesh.verts.AddRange(tmpVerts);
            subMesh.tris.AddRange(tmpIndices);
            FinalizeMesh(MeshParts.All);
            yield break;
IL_0137:
            /*Error near IL_0138: Unexpected return in MoveNext()*/;
        }
コード例 #4
0
        public override IEnumerable Regenerate()
        {
            foreach (object item in base.Regenerate())
            {
                yield return(item);
            }
            SphereGenerator.Generate(4, 108.1f, Vector3.forward, 360f, out List <Vector3> outVerts, out List <int> outIndices);
            LayerSubMesh subMesh = GetSubMesh(WorldMaterials.PlanetGlow);

            subMesh.verts.AddRange(outVerts);
            subMesh.tris.AddRange(outIndices);
            FinalizeMesh(MeshParts.All);
        }
コード例 #5
0
        public override IEnumerable Regenerate()
        {
            foreach (object result in base.Regenerate())
            {
                yield return(result);
            }
            List <Vector3> tmpVerts;
            List <int>     tmpIndices;

            SphereGenerator.Generate(4, 108.1f, Vector3.forward, 360f, out tmpVerts, out tmpIndices);
            LayerSubMesh subMesh = base.GetSubMesh(WorldMaterials.PlanetGlow);

            subMesh.verts.AddRange(tmpVerts);
            subMesh.tris.AddRange(tmpIndices);
            base.FinalizeMesh(MeshParts.All);
        }
コード例 #6
0
        public override IEnumerable Regenerate()
        {
            foreach (object item in base.Regenerate())
            {
                yield return(item);
            }
            Vector3 viewCenter = Find.WorldGrid.viewCenter;
            float   viewAngle  = Find.WorldGrid.viewAngle;

            if (viewAngle < 180f)
            {
                SphereGenerator.Generate(4, 99.85f, -viewCenter, 180f - Mathf.Min(viewAngle, 180f) + 10f, out List <Vector3> outVerts, out List <int> outIndices);
                LayerSubMesh subMesh = GetSubMesh(WorldMaterials.UngeneratedPlanetParts);
                subMesh.verts.AddRange(outVerts);
                subMesh.tris.AddRange(outIndices);
            }
            FinalizeMesh(MeshParts.All);
        }
コード例 #7
0
        public override IEnumerable Regenerate()
        {
            foreach (object result in base.Regenerate())
            {
                yield return(result);
            }
            Vector3 planetViewCenter = Find.WorldGrid.viewCenter;
            float   planetViewAngle  = Find.WorldGrid.viewAngle;

            if (planetViewAngle < 180f)
            {
                List <Vector3> collection;
                List <int>     collection2;
                SphereGenerator.Generate(4, 99.85f, -planetViewCenter, 180f - Mathf.Min(planetViewAngle, 180f) + 10f, out collection, out collection2);
                LayerSubMesh subMesh = base.GetSubMesh(WorldMaterials.UngeneratedPlanetParts);
                subMesh.verts.AddRange(collection);
                subMesh.tris.AddRange(collection2);
            }
            base.FinalizeMesh(MeshParts.All);
        }
        public override IEnumerable Regenerate()
        {
            IEnumerator enumerator = base.Regenerate().GetEnumerator();

            try
            {
                if (enumerator.MoveNext())
                {
                    object result = enumerator.Current;
                    yield return(result);

                    /*Error: Unable to find new state assignment for yield return*/;
                }
            }
            finally
            {
                IDisposable disposable;
                IDisposable disposable2 = disposable = (enumerator as IDisposable);
                if (disposable != null)
                {
                    disposable2.Dispose();
                }
            }
            Vector3 planetViewCenter = Find.WorldGrid.viewCenter;
            float   planetViewAngle  = Find.WorldGrid.viewAngle;

            if (planetViewAngle < 180.0)
            {
                List <Vector3> collection  = default(List <Vector3>);
                List <int>     collection2 = default(List <int>);
                SphereGenerator.Generate(4, 99.85f, -planetViewCenter, (float)(180.0 - Mathf.Min(planetViewAngle, 180f) + 10.0), out collection, out collection2);
                LayerSubMesh subMesh = base.GetSubMesh(WorldMaterials.UngeneratedPlanetParts);
                subMesh.verts.AddRange(collection);
                subMesh.tris.AddRange(collection2);
            }
            base.FinalizeMesh(MeshParts.All);
            yield break;
IL_0167:
            /*Error near IL_0168: Unexpected return in MoveNext()*/;
        }