示例#1
0
 public void RegisterHealthListener(IRateListener listener, bool updateImmediately = false)
 {
     this.healthListeners.Add(listener);
     if (updateImmediately)
     {
         listener.OnRateChange(this, this.CurrentHealth);
     }
 }
示例#2
0
 public void RegisterCooldownListener(IRateListener listener, bool updateImmediately = false)
 {
     this.cooldownListeners.Add(listener);
     if (updateImmediately)
     {
         listener.OnRateChange(this, this.RemainingCooldown / this.cooldownSeconds);
     }
 }
示例#3
0
 public void RegisterCastTimeListener(IRateListener listener, bool updateImmediately = false)
 {
     this.castTimeListeners.Add(listener);
     if (updateImmediately)
     {
         listener.OnRateChange(this, 0f);
     }
 }
示例#4
0
 public void DeregisterHealthListener(IRateListener listener)
 {
     this.healthListeners.Remove(listener);
 }
示例#5
0
 public void DeregisterCooldownListener(IRateListener listener)
 {
     this.cooldownListeners.Remove(listener);
 }
示例#6
0
 public void DeregisterCastTimeListener(IRateListener listener)
 {
     this.castTimeListeners.Remove(listener);
 }