private static EntityRenderFragment smethod_5(Color color_0, string string_0, int int_0, int int_1, Color?nullable_0 = null, params object[] args) { EntityRenderFragment entityRenderFragment = new EntityRenderFragment(); entityRenderFragment.Fill = ((color_0 == Color.Transparent) ? "" : GClass840.smethod_0(color_0)); entityRenderFragment.Stroke = ((nullable_0 != null) ? GClass840.smethod_0(nullable_0.Value) : ""); entityRenderFragment.Shape = string_0; entityRenderFragment.Extra = args.Where(new Func <object, bool>(GClass840.< > c.< > c_0.method_0)).Select(new Func <object, string>(GClass840.< > c.< > c_0.method_1)).ToList <string>(); entityRenderFragment.ExtraF = args.Where(new Func <object, bool>(GClass840.< > c.< > c_0.method_2)).Select(new Func <object, float>(GClass840.< > c.< > c_0.method_3)).ToList <float>(); entityRenderFragment.OffsetX = (float)int_0; entityRenderFragment.OffsetY = (float)int_1; entityRenderFragment.Alpha = ((color_0 == Color.Transparent) ? 1f : ((float)color_0.A / 255f)); return(entityRenderFragment); }
public static MapViewData smethod_24(GClass839 gclass839_0, bool bool_0) { Map map = gclass839_0.Map; MapViewData mapViewData = new MapViewData(); mapViewData.Background = GClass840.smethod_0(Color.Black); mapViewData.MapId = map.MapId; List <EntityDataRoot> entities = mapViewData.Entities; entities.Add(GClass840.smethod_17(map)); if (bool_0) { List <EntityDataRoot> list = mapViewData.CachableEntities = new List <EntityDataRoot>(); mapViewData.IncludesCache = true; foreach (KeyValuePair <string, ICollidable> keyValuePair in map.Collidables) { CollidableRect collidableRect = keyValuePair.Value as CollidableRect; if (collidableRect != null && collidableRect.imethod_0(map) != CollidableType.None) { list.Add(GClass840.smethod_22(map, collidableRect)); } } foreach (KeyValuePair <int, Asset> keyValuePair2 in map.Assets) { list.Add(GClass840.smethod_23(map, keyValuePair2.Value)); } } foreach (KeyValuePair <int, Gate> keyValuePair3 in map.Gates) { entities.Add(GClass840.smethod_14(map, keyValuePair3.Value)); } foreach (KeyValuePair <string, Collectible> keyValuePair4 in map.Collectibles) { entities.Add(GClass840.smethod_13(map, keyValuePair4.Value)); } Ship selectedShip = map.SelectedShip; foreach (KeyValuePair <int, Ship> keyValuePair5 in map.Ships) { if (keyValuePair5.Value != selectedShip) { entities.Add(GClass840.smethod_12(gclass839_0, map, keyValuePair5.Value)); } } if (selectedShip != null) { entities.Add(GClass840.smethod_12(gclass839_0, map, selectedShip)); } entities.Add(GClass840.smethod_21(map)); EntityDataRoot entityDataRoot = GClass840.smethod_18(gclass839_0, map); if (entityDataRoot != null) { entities.Add(entityDataRoot); } entities.Add(GClass840.smethod_20(map, map.Hero)); if (selectedShip != null) { entities.Add(GClass840.smethod_20(map, selectedShip)); } entities.Add(GClass840.smethod_19(gclass839_0)); return(mapViewData); }