Пример #1
0
 public void ReadJson(JObject json, Context context)
 {
     foreach (var pair in json)
     {
         string id    = pair.Key;
         double value = pair.Value.Value <double>();
         Feelings[LevelFeeling.GetFeeling(id)] = value;
     }
 }
Пример #2
0
 public double this[LevelFeeling feeling]
 {
     get
     {
         return(Feelings.GetOrDefault(feeling, 0));
     }
     set
     {
         Feelings[feeling] = value;
     }
 }
Пример #3
0
 public void Multiply(LevelFeeling feeling, double n)
 {
     Feelings[feeling] = Feelings.GetOrDefault(feeling, 0) * n;
 }
Пример #4
0
 public void Add(LevelFeeling feeling, double n)
 {
     Feelings[feeling] = Feelings.GetOrDefault(feeling, 0) + n;
 }
Пример #5
0
 public void Set(LevelFeeling feeling, double n)
 {
     Feelings[feeling] = n;
 }