private static EntityDataRoot smethod_23(Map map_0, Asset asset_0) { Color color_ = MapUtils.smethod_16(map_0, asset_0); EntityDataRoot entityDataRoot = GClass840.smethod_2(map_0, asset_0); entityDataRoot.Data.Add(GClass840.smethod_9(color_, 3, 1, new Color?(Color.DarkGray))); return(entityDataRoot); }
private static EntityDataRoot smethod_13(Map map_0, Collectible collectible_0) { EntityDataRoot entityDataRoot = GClass840.smethod_2(map_0, collectible_0); Color color_ = MapUtils.smethod_16(map_0, collectible_0); entityDataRoot.Data = new List <EntityRenderFragment> { GClass840.smethod_6(color_, 3, null) }; return(entityDataRoot); }
private static EntityDataRoot smethod_14(Map map_0, Gate gate_0) { EntityDataRoot entityDataRoot = GClass840.smethod_2(map_0, gate_0); Color color = MapUtils.smethod_16(map_0, gate_0); entityDataRoot.Data = new List <EntityRenderFragment> { GClass840.smethod_6(color, 3, null), GClass840.smethod_9(Color.Transparent, 12, 3, new Color?(color)) }; return(entityDataRoot); }
private static EntityDataRoot smethod_21(Map map_0) { EntityDataRoot entityDataRoot = GClass840.smethod_2(map_0, map_0.Hero); Color color_ = MapUtils.smethod_16(map_0, map_0.Hero); entityDataRoot.Data = new List <EntityRenderFragment>(); if (map_0.Hero.MovementDestination != null) { Vector2 value = map_0.Hero.MovementDestination.Value; float float_ = value.X / (float)map_0.MapSize.Width; float float_2 = value.Y / (float)map_0.MapSize.Height; entityDataRoot.Data.Add(GClass840.smethod_10(Color.Transparent, 2, float_, float_2, new Color?(Color.RoyalBlue))); } entityDataRoot.Data.Add(GClass840.smethod_6(color_, 8, null)); return(entityDataRoot); }
private static EntityDataRoot smethod_12(GClass839 gclass839_0, Map map_0, Ship ship_0) { EntityDataRoot entityDataRoot = GClass840.smethod_2(map_0, ship_0); Color color_ = MapUtils.smethod_16(map_0, ship_0); NpcShip npcShip = ship_0 as NpcShip; if (npcShip != null && (!(gclass839_0.Behavior ?? gclass839_0.gclass853_0).vmethod_8(npcShip) || npcShip.LeashedBy > 0)) { color_ = Color.Gray; } Color?nullable_ = null; entityDataRoot.Data = new List <EntityRenderFragment> { GClass840.smethod_6(color_, 4, nullable_) }; return(entityDataRoot); }
private static EntityDataRoot smethod_20(Map map_0, Ship ship_0) { EntityDataRoot entityDataRoot = new EntityDataRoot((ship_0 is Hero) ? 0.8333333f : 0.166666672f, 0.8f); float hpPercentage = ship_0.HpPercentage; float shieldPercentage = ship_0.ShieldPercentage; string hpDisplay = ship_0.HpDisplay; string shieldDisplay = ship_0.ShieldDisplay; int num = (int)(Math.Ceiling((double)(116f * hpPercentage / 200f)) * 2.0); int num2 = (int)(Math.Ceiling((double)(116f * shieldPercentage / 200f)) * 2.0); entityDataRoot.Data = new List <EntityRenderFragment> { GClass840.smethod_7(Color.FromArgb(150, Color.LightSlateGray), 120, 20, null), GClass840.smethod_7(Color.FromArgb(150, Color.LawnGreen), num, 16, null), GClass840.smethod_11(Color.FromArgb(150, Color.White), "12px Arial", "center", hpDisplay, null), GClass840.smethod_7(Color.FromArgb(150, Color.LightSlateGray), 120, 20, null), GClass840.smethod_7(Color.FromArgb(150, Color.DodgerBlue), num2, 16, null), GClass840.smethod_11(Color.FromArgb(150, Color.White), "12px Arial", "center", shieldDisplay, null) }; entityDataRoot.Data[1].OffsetX = (float)(num / 2 - 58); entityDataRoot.Data[2].OffsetY = 4f; entityDataRoot.Data[3].OffsetY = 24f; entityDataRoot.Data[4].OffsetX = (float)(num2 / 2 - 58); entityDataRoot.Data[4].OffsetY = 24f; entityDataRoot.Data[5].OffsetY = 24f + entityDataRoot.Data[2].OffsetY; string string_ = ship_0.Name; Hero hero = ship_0 as Hero; if (hero != null) { string_ = ""; if (hero.Cloaked) { string_ = "Cloaked"; } } entityDataRoot.Data.Add(GClass840.smethod_11(Color.DarkRed, "13px Arial", "center", string_, null)); entityDataRoot.Data.Last <EntityRenderFragment>().OffsetY = entityDataRoot.Data[2].OffsetY - 24f; return(entityDataRoot); }
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); }