public void SetEquipmentData()
        {
            var unit = _unitsMenuController.Roster.ActiveUnit.UnitData;

            foreach (var equipmentData in unit.Outfit)
            {
                var equipmentKey = StringParse.GetItemKey(equipmentData);
                var equipment    = _productsController.GetProduct(equipmentKey);
                var qualityKey   = StringParse.GetItemQualityKey(equipmentData);
                var quality      = EnumParse.ParseStringToEnum <ItemQuality>(qualityKey);
                _cells.First(x => x.Group == equipment.ProductGroup).SetEquipmentData(equipment, quality);
            }
        }
Exemplo n.º 2
0
        public void LoadStoreData(ProductionsLoadObject data, MonoBehaviour monoBehaviour)
        {
            _monoBehaviour = monoBehaviour;
            Production.InitCells(data.count);

            foreach (var prodObj in data.production)
            {
                //TODO сделать билдер для продакшн объекта
                var production = new ProductionObject
                {
                    Key     = prodObj.key,
                    Quality = EnumParse.ParseStringToEnum <ItemQuality>(prodObj.quality),
                    Index   = prodObj.index,
                    TimeEnd = prodObj.timeEnd,
                    IsLoad  = true
                };

                StartProduction(production);
            }
        }
 public void LoadSettingsData(SettingsLoadObject data)
 {
     Language = EnumParse.ParseStringToEnum <LanguageType>(data.language);
     Graphics = EnumParse.ParseStringToEnum <GraphicsType>(data.graphics);
 }