Пример #1
0
    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) ? "" : GClass891.smethod_0(color_0));
        entityRenderFragment.Stroke  = ((nullable_0 != null) ? GClass891.smethod_0(nullable_0.Value) : "");
        entityRenderFragment.Shape   = string_0;
        entityRenderFragment.Extra   = args.Where(new Func <object, bool>(GClass891.< > c.< > c_0.method_0)).Select(new Func <object, string>(GClass891.< > c.< > c_0.method_1)).ToList <string>();
        entityRenderFragment.ExtraF  = args.Where(new Func <object, bool>(GClass891.< > c.< > c_0.method_2)).Select(new Func <object, float>(GClass891.< > 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);
    }
Пример #2
0
    public static MapViewData smethod_24(GClass890 gclass890_0, bool bool_0)
    {
        Map         map         = gclass890_0.Map;
        MapViewData mapViewData = new MapViewData();

        mapViewData.Background = GClass891.smethod_0(Color.Black);
        mapViewData.MapId      = map.MapId;
        List <EntityDataRoot> entities = mapViewData.Entities;

        entities.Add(GClass891.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(GClass891.smethod_22(map, collidableRect));
                }
            }
            foreach (KeyValuePair <int, Asset> keyValuePair2 in map.Assets)
            {
                list.Add(GClass891.smethod_23(map, keyValuePair2.Value));
            }
        }
        foreach (KeyValuePair <int, Gate> keyValuePair3 in map.Gates)
        {
            entities.Add(GClass891.smethod_14(map, keyValuePair3.Value));
        }
        foreach (KeyValuePair <string, Collectible> keyValuePair4 in map.Collectibles)
        {
            entities.Add(GClass891.smethod_13(map, keyValuePair4.Value));
        }
        Ship selectedShip = map.SelectedShip;

        foreach (KeyValuePair <int, Ship> keyValuePair5 in map.Ships)
        {
            if (keyValuePair5.Value != selectedShip)
            {
                entities.Add(GClass891.smethod_12(gclass890_0, map, keyValuePair5.Value));
            }
        }
        if (selectedShip != null)
        {
            entities.Add(GClass891.smethod_12(gclass890_0, map, selectedShip));
        }
        entities.Add(GClass891.smethod_21(map));
        EntityDataRoot entityDataRoot = GClass891.smethod_18(gclass890_0, map);

        if (entityDataRoot != null)
        {
            entities.Add(entityDataRoot);
        }
        entities.Add(GClass891.smethod_20(map, map.Hero));
        if (selectedShip != null)
        {
            entities.Add(GClass891.smethod_20(map, selectedShip));
        }
        entities.Add(GClass891.smethod_19(gclass890_0));
        return(mapViewData);
    }