public bool Reload() { if (Time.time - lastReloadTime < reloadTime) { return(false); } if (maxMagasins <= 0) { return(false); } bulletsInMagasin = maxBulletsInMagasin; magasins--; if (ReloadedEvent != null) { ReloadedEvent.Invoke(this); } lastReloadTime = Time.time; return(true); }
public void OnReloaded() { ReloadedEvent?.Invoke(); }