public void RegisterHealthListener(IRateListener listener, bool updateImmediately = false) { this.healthListeners.Add(listener); if (updateImmediately) { listener.OnRateChange(this, this.CurrentHealth); } }
public void RegisterCooldownListener(IRateListener listener, bool updateImmediately = false) { this.cooldownListeners.Add(listener); if (updateImmediately) { listener.OnRateChange(this, this.RemainingCooldown / this.cooldownSeconds); } }
public void RegisterCastTimeListener(IRateListener listener, bool updateImmediately = false) { this.castTimeListeners.Add(listener); if (updateImmediately) { listener.OnRateChange(this, 0f); } }
public void DeregisterHealthListener(IRateListener listener) { this.healthListeners.Remove(listener); }
public void DeregisterCooldownListener(IRateListener listener) { this.cooldownListeners.Remove(listener); }
public void DeregisterCastTimeListener(IRateListener listener) { this.castTimeListeners.Remove(listener); }