public void Update(float amount) { _current += amount; if (_current < 0) { _current = 0; } else if (_current > _max) { _current = _max; } UpdateModifiers(); OnCurrentChanged?.Invoke(this); if (_current <= 0f) { OnCurrentCritical?.Invoke(this); } }
private void CurChannelButton_OnClick(object sender, RoutedEventArgs e) { IsCurrent = true; OnCurrentChanged?.Invoke(); OnPropertyChanged(nameof(IsCurrent)); }