private void SelectWeapon(int index) { if (index >= _WeaponCount) { return; } if (currentWeapon != index || !_weapons[index].active) { _weapons[currentWeapon].SetActive(false); _weapons[index].SetActive(true); currentWeapon = index; audioSource.PlayOneShot(changeSound); } else { _weapons[index].SetActive(false); audioSource.PlayOneShot(takeOutSound); _playerCanvas.AmmoTextChange("-", "-"); } }
private void ShowAmmo() { _playerCanvas.AmmoTextChange(totalAmmo.ToString(), ammoInMagazine.ToString()); }