Exemple #1
0
        public Ets2Company(string line, Ets2Mapper mapper)
        {
            Mapper = mapper;

            var d = line.Split(",".ToCharArray());

            PrefabID = d[0];
            int.TryParse(d[1], out MinX);
            int.TryParse(d[2], out MinY);
            int.TryParse(d[3], out MaxX);
            int.TryParse(d[4], out MaxY);

            // find prefab obj
            Prefab = mapper.PrefabsLookup.FirstOrDefault(x => x.IDSII == PrefabID);

            if (Prefab!=null)
                Prefab.Company = this;
        }
        public Ets2Company(string line, Ets2Mapper mapper)
        {
            Mapper = mapper;

            var d = line.Split(",".ToCharArray());

            PrefabID = d[0];
            int.TryParse(d[1], out MinX);
            int.TryParse(d[2], out MinY);
            int.TryParse(d[3], out MaxX);
            int.TryParse(d[4], out MaxY);

            // find prefab obj
            Prefab = mapper.PrefabsLookup.FirstOrDefault(x => x.IDSII == PrefabID);

            if (Prefab != null)
            {
                Prefab.Company = this;
            }
        }