public void Invoke(Vector3 position, Quaternion rotation, Actor owner, CompositeDisposable disposables) { if (!m_CanFire) { return; } foreach (var e in m_Elements) { e.Fire(position, rotation, owner, m_Modifiers, disposables); } m_CanFire = false; var coolTimeData = new IMuzzleModifier.OnCoolTimeData(); foreach (var i in m_Modifiers) { i.OnCoolTime(coolTimeData); } owner.Events.TimerSafe(TimeSpan.FromSeconds(m_CoolTimeSeconds * coolTimeData.coolTimeRate)) .Subscribe(_ => m_CanFire = true); }
public override void OnCoolTime(IMuzzleModifier.OnCoolTimeData data) { data.coolTimeRate += m_Rate; }
public virtual void OnCoolTime(IMuzzleModifier.OnCoolTimeData data) { }