Advertisement
jretchy

Untitled

May 17th, 2022
507
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.43 KB | None | 0 0
  1.  
  2.     public AudioSource myFx;
  3.     public AudioClip hoverFx;
  4.     public AudioClip clickFx;
  5.  
  6.     public void HoverSound()
  7.     {
  8.         myFx.PlayOneShot(hoverFx);
  9.     }
  10.  
  11.     public void ClickSound()
  12.     {
  13.         myFx.PlayOneShot(clickFx);
  14.     }
  15.  
  16.  
  17.     public void BackPressed()
  18.     {
  19.         if (this.gameObject.activeInHierarchy == true)
  20.         {
  21.             FindObjectOfType<PauseMenu>().BackButton();
  22.         }
  23.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement