public void OnReload(InputAction.CallbackContext context) { if (context.phase == InputActionPhase.Performed) { ReloadEvent.Invoke(); } }
public void ShellEntered() { _bulletsInMagasine++; _reloadEvent.Invoke(_bulletsInMagasine, _maxBulletsInMagasine); if (_bulletsInMagasine >= _maxBulletsInMagasine) { _animator.SetTrigger("EndReload"); } }
private IEnumerator WaitForReload() { _reloading = true; reloadingText.SetActive(true); yield return(new WaitForSeconds(_weapon.reloadTime)); reloadingText.SetActive(false); ReloadEvent?.Invoke(_weapon.weaponType); _emptyMagazine = false; _reloading = false; }
public virtual void OnReloadEvent() { ReloadEvent?.Invoke(); }
public void OnClickedReloadButton() { ReloadEvent?.Invoke(); }
private void Reload_Click(object sender, RoutedEventArgs e) { ReloadEvent?.Invoke(sender, e); }
public virtual void StartReload(float _lastReload) { _startRecharge.Invoke(_lastReload); }