Advertisement
jretchy

Untitled

May 17th, 2022
448
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data Copied
Advertisement