Advertisement
Guest User

Untitled

a guest
Aug 31st, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. using UnityEngine;
  2. public class Audiou2 : MonoBehaviour {
  3. public AudioClip Audi;
  4. public AnimationClip a;
  5. public GameObject As;
  6.  
  7. void OnGUI()
  8. {
  9. if(GUI.Button(new Rect(15,105,81,81),""))
  10. {
  11. audio.clip = Audi;
  12. audio.Play();
  13. }
  14. if(GUI.Button(new Rect(15,105,81,81),""))
  15. {
  16. As.animation.Play(a.name);
  17. }
  18. }
  19. }
  20.  
  21. void OnGUI() {
  22. if(GUI.Button(new Rect(15,105,81,81),"")) {audio.clip = Audi;
  23. audio.Play();
  24. As.animation.Play(a.name);
  25. } }
  26.  
  27. public void Activation(){
  28. audio.clip = Audi;
  29. audio.Play();
  30. As.animation.Play(a.name);
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement