Пример #1
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);
    }