Пример #1
0
 public void Load(ValuesDictionary valuesDictionary)
 {
     foreach (FieldInfo stat in Stats)
     {
         if (valuesDictionary.ContainsKey(stat.Name))
         {
             object value = valuesDictionary.GetValue <object>(stat.Name);
             stat.SetValue(this, value);
         }
     }
     if (!string.IsNullOrEmpty(DeathRecordsString))
     {
         string[] array = DeathRecordsString.Split(new char[1]
         {
             ';'
         }, StringSplitOptions.RemoveEmptyEntries);
         foreach (string s in array)
         {
             DeathRecord item = default(DeathRecord);
             item.Load(s);
             m_deathRecords.Add(item);
         }
     }
 }