Example #1
0
 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);
 }
Example #2
0
 public void OnReloaded()
 {
     ReloadedEvent?.Invoke();
 }