Beispiel #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;
     }
 }
Beispiel #2
0
 public double this[LevelFeeling feeling]
 {
     get
     {
         return(Feelings.GetOrDefault(feeling, 0));
     }
     set
     {
         Feelings[feeling] = value;
     }
 }
Beispiel #3
0
 public void Multiply(LevelFeeling feeling, double n)
 {
     Feelings[feeling] = Feelings.GetOrDefault(feeling, 0) * n;
 }
Beispiel #4
0
 public void Add(LevelFeeling feeling, double n)
 {
     Feelings[feeling] = Feelings.GetOrDefault(feeling, 0) + n;
 }
Beispiel #5
0
 public void Set(LevelFeeling feeling, double n)
 {
     Feelings[feeling] = n;
 }