Beispiel #1
0
 public void deactivate()
 {
     retrieved = true;
     gameObject.SetActive(false);
     if (PickupSound)
     {
         PickupSound.PlayRandomSFX();
     }
 }
 public void PlayJumpSFX()
 {
     if (entity.IsOwner)
     {
         Jump.PlayRandomSFX();       // do not play jump sfx for other players.
     }
     else
     {
         Jump.PlayRandomQuietSFX();          // play quiet sfx for other players.
     }
 }
 public void PlayWalkSFX()
 {
     if (entity.IsOwner)
     {
         Walk.PlayRandomSFX();           // everyone can hear you walk.
     }
     else
     {
         Walk.PlayRandomQuietSFX();
     }
 }
 public void UseAttacK()     // toggle only when you successfully hit someone. called by the player you hit.
 {
     if (ToggleHitsLeft)
     {
         return;
     }
     ToggleHitsLeft    = true;
     NumberOfHitsLeft -= 1;
     if (WeaponUseSFX != null)
     {
         WeaponUseSFX.PlayRandomSFX();
     }
     ItemUI.UpdateItemCount(NumberOfHitsLeft.ToString());
     Invoke("ResetHitsLeft", HitCoolDown);
 }