public override void Shoot(WeaponBehaviourScript weapon) { if (canShoot && weapon.CurrentMagazineAmmunition > 0) { weapon.StartCoroutine(WaitForShot(weapon)); weapon.GetComponent <AudioSource>()?.PlayOneShot(weapon.WeaponData.ShootAudioClip); } }
public override void Reload(WeaponBehaviourScript weapon) { if (canReload && weapon.CurrentTotalAmmunition >= 1 && weapon.CurrentMagazineAmmunition < weapon.WeaponData.MagazineCapacity) { weapon.StartCoroutine(WaitForReload(weapon)); weapon.GetComponent <AudioSource>()?.PlayOneShot(weapon.WeaponData.ReloadAudioClip); } }
public override void Shoot(WeaponBehaviourScript weapon) { if (canShoot && weapon.CurrentMagazineAmmunition >= 0) { canShoot = false; weapon.StartCoroutine(WaitForShot(weapon)); } }