Ejemplo n.º 1
0
 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("-", "-");
     }
 }
Ejemplo n.º 2
0
 private void ShowAmmo()
 {
     _playerCanvas.AmmoTextChange(totalAmmo.ToString(), ammoInMagazine.ToString());
 }