Пример #1
0
        public MapData(JSONConfiguration config)
        {
            this.ShowConvoyLink = (config.Convoy != null);
            this.ShowShopLink   = (config.Shop != null);

            //Process data, order is important on these
            this.System = new SystemInfo(config.System);
            this.Map    = new MapObj(config.Map, this.System.TerrainTypes, this.System.TerrainEffects);

            this.Units = UnitsHelper.Process(config.Units, this.System, this.Map);

            //Calculate unit ranges
            RangeHelper rangeHelper = new RangeHelper(this.Units, this.Map);

            rangeHelper.CalculateUnitRanges();

            //Clean up
            this.System.RemoveUnusedObjects();
        }