Пример #1
0
 public ModuleSettingData(XElement element)
 {
     m_SlotSettings = new ConcurrentDictionary <ShipModelSlotType, ModuleSlotSettingData>();
     m_Workshop     = (Workshop)Enum.Parse(typeof(Workshop), element.GetString("name"));
     var dump = element.Elements("slot").Select(slotElement => {
         ModuleSlotSettingData slotData = new ModuleSlotSettingData(slotElement);
         m_SlotSettings.TryAdd(slotData.slotType, slotData);
         return(slotData);
     }).ToList();
 }
Пример #2
0
 public bool TryGetSlotSetting(ShipModelSlotType slotType, out ModuleSlotSettingData data)
 {
     return(m_SlotSettings.TryGetValue(slotType, out data));
 }