Esempio n. 1
0
 protected override void Awake()
 {
     base.Awake();
     UnityEngine.Object.DontDestroyOnLoad(this);
     m_AudioSource           = GetComponent(typeof(AudioSource)) as AudioSource;
     m_AudioListenerCtrl     = GetComponent(typeof(AudioListenerCtrl)) as AudioListenerCtrl;
     MusicPlayer.musicPlayer = this;
 }
Esempio n. 2
0
 void OnDestroy()
 {
     m_AudioListenerCtrl     = null;
     m_AudioSource           = null;
     MusicPlayer.musicPlayer = null;
 }