RealiteeeyyyyTV

Untitled

Jan 4th, 2018
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class MusicManager : MonoBehaviour {
  5.  
  6. public AudioClip mainTheme;
  7. public AudioClip menuTheme;
  8.  
  9. void Start() {
  10. AudioManager.instance.PlayMusic (menuTheme, 2);
  11. }
  12.  
  13. void Update () {
  14. if (Input.GetKeyDown (KeyCode.Space)) {
  15. AudioManager.instance.PlayMusic (mainTheme, 3);
  16. }
  17.  
  18. }
  19. }
Add Comment
Please, Sign In to add comment