Esempio n. 1
0
 public DerivedStat(float percent, BaseStat stat, string id = "") : base(percent)
 {
     TargetStat = stat;
     if (string.IsNullOrEmpty(id))
     {
         Id = TargetStat.AddValueMod(ValueTotal);
     }
     else
     {
         Id = id;
         TargetStat.AddValueMod(new StatValueMod(ValueTotal, id));
     }
 }
Esempio n. 2
0
 public override void Attach(BaseStat target)
 {
     if (target == null)
     {
         return;
     }
     _targetStat = new CachedStat <BaseStat>(target);
     _id         = target.AddValueMod(_amount);
 }