private void RemoveCharge(int amountToRemove) { _rechargeTimer = 0f; _currentCharges = _currentCharges - amountToRemove <= 0 ? 0 : _currentCharges -= amountToRemove; if (_currentCharges <= 0) { NoDashCharges?.Invoke(); } OnDashChargesChanged?.Invoke(_currentCharges); }
private void AddCharge() { _currentCharges = _currentCharges >= _maxCharges ? _maxCharges : _currentCharges += 2; OnDashChargesChanged?.Invoke(_currentCharges); }