예제 #1
0
        public static IEnumerable <Blueprint_Build> PlaceBlueprints(IntVec3 placeCenter, Map map, Faction placeFaction, float points)
        {
            SiegeBlueprintPlacer.center  = placeCenter;
            SiegeBlueprintPlacer.faction = placeFaction;
            using (IEnumerator <Blueprint_Build> enumerator = SiegeBlueprintPlacer.PlaceSandbagBlueprints(map).GetEnumerator())
            {
                if (enumerator.MoveNext())
                {
                    Blueprint_Build blue2 = enumerator.Current;
                    yield return(blue2);

                    /*Error: Unable to find new state assignment for yield return*/;
                }
            }
            using (IEnumerator <Blueprint_Build> enumerator2 = SiegeBlueprintPlacer.PlaceArtilleryBlueprints(points, map).GetEnumerator())
            {
                if (enumerator2.MoveNext())
                {
                    Blueprint_Build blue = enumerator2.Current;
                    yield return(blue);

                    /*Error: Unable to find new state assignment for yield return*/;
                }
            }
            yield break;
IL_0166:
            /*Error near IL_0167: Unexpected return in MoveNext()*/;
        }
예제 #2
0
 public static IEnumerable <Blueprint_Build> PlaceBlueprints(IntVec3 placeCenter, Map map, Faction placeFaction, float points)
 {
     SiegeBlueprintPlacer.center  = placeCenter;
     SiegeBlueprintPlacer.faction = placeFaction;
     foreach (Blueprint_Build blue in SiegeBlueprintPlacer.PlaceSandbagBlueprints(map))
     {
         yield return(blue);
     }
     foreach (Blueprint_Build blue2 in SiegeBlueprintPlacer.PlaceArtilleryBlueprints(points, map))
     {
         yield return(blue2);
     }
 }
            public bool MoveNext()
            {
                uint num = (uint)this.$PC;

                this.$PC = -1;
                bool flag = false;

                switch (num)
                {
                case 0u:
                    SiegeBlueprintPlacer.center  = placeCenter;
                    SiegeBlueprintPlacer.faction = placeFaction;
                    enumerator = SiegeBlueprintPlacer.PlaceSandbagBlueprints(map).GetEnumerator();
                    num        = 4294967293u;
                    break;

                case 1u:
                    break;

                case 2u:
                    goto IL_E9;

                default:
                    return(false);
                }
                try
                {
                    switch (num)
                    {
                    }
                    if (enumerator.MoveNext())
                    {
                        blue          = enumerator.Current;
                        this.$current = blue;
                        if (!this.$disposing)
                        {
                            this.$PC = 1;
                        }
                        flag = true;
                        return(true);
                    }
                }
                finally
                {
                    if (!flag)
                    {
                        if (enumerator != null)
                        {
                            enumerator.Dispose();
                        }
                    }
                }
                enumerator2 = SiegeBlueprintPlacer.PlaceArtilleryBlueprints(points, map).GetEnumerator();
                num         = 4294967293u;
                try
                {
IL_E9:
                    switch (num)
                    {
                    }
                    if (enumerator2.MoveNext())
                    {
                        blue2         = enumerator2.Current;
                        this.$current = blue2;
                        if (!this.$disposing)
                        {
                            this.$PC = 2;
                        }
                        flag = true;
                        return(true);
                    }
                }
                finally
                {
                    if (!flag)
                    {
                        if (enumerator2 != null)
                        {
                            enumerator2.Dispose();
                        }
                    }
                }
                this.$PC = -1;
                return(false);
            }