IEnumerator Reload() { canAttack = false; int availableAmmo = CheckReload(); if (currentWeapon.bulletInMagazine < currentWeapon.magazineCapacity && availableAmmo > currentWeapon.bulletInMagazine) { currentWeapon.Reload(availableAmmo); yield return(new WaitForSeconds(2f)); } canAttack = true; UIAmmoWeapon(currentWeapon); }
public override void AlternativeUse(PlayerCharacter by, InteractableObject target = null) { // Reload _weaponInstance.Reload(by); photonView.RPC("OnReload_RPC", RpcTarget.All); }