public override Vector2?vmethod_19(Vector2 vector2_1, out Gate gate_0, bool bool_3 = false, bool bool_4 = true) { gate_0 = null; List <KeyValuePair <int, Gate> > list = base.C.Map.Gates.Where(new Func <KeyValuePair <int, Gate>, bool>(this.method_24)).OrderBy(new Func <KeyValuePair <int, Gate>, int>(GClass910.< > c.< > c_0.method_0)).ToList <KeyValuePair <int, Gate> >(); if (list.Count != 2) { return(null); } CollidableRect collidableRect = base.C.Map.Collidables.FirstOrDefault(new Func <KeyValuePair <string, ICollidable>, bool>(GClass910.< > c.< > c_0.method_1)).Value as CollidableRect; if (collidableRect == null) { return(null); } Gate value; if (vector2_1.X < (float)collidableRect.Rect.X) { value = list[0].Value; } else { value = list[1].Value; } return(new Vector2?(value.Position)); }
private static EntityDataRoot smethod_22(Map map_0, CollidableRect collidableRect_0) { Rectangle rectangle = collidableRect_0.imethod_1(); DarkorbitAPI.CommonStructures.Size mapSize = map_0.MapSize; Color cyan = Color.Cyan; Color color_ = Color.FromArgb(60, (int)cyan.R, (int)cyan.G, (int)cyan.B); return(GClass840.smethod_15(map_0, (float)rectangle.X, (float)rectangle.Y, new EntityRenderFragment[] { GClass840.smethod_8(color_, (float)rectangle.Width / (float)mapSize.Width, (float)rectangle.Height / (float)mapSize.Height, null) })); }
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); }