示例#1
0
        protected void PlayMusic()
        {
            AssetInfo info = ConfigManager.Instance.GetAssetInfo(name);

            if (info.audio > 0)
            {
                AudioClip clip = ZAssetController.Instance.GetAudioClip(info.audio);
                ZAudioManager.PlayMusic(clip, gameObject, true);
            }
        }
示例#2
0
        private void PlayAudioHandler()
        {
            isPlaying = !isPlaying;
            var img = audioButton.GetComponent <Image>();

            if (isPlaying)
            {
                img.sprite = turnOffSp;
                //ZAudioManager.PlayMusic(audioPath, mTransform.parent.gameObject, false);
            }
            else
            {
                img.sprite = turnOnSp;
                ZAudioManager.Stop(mTransform.parent.gameObject);
            }
        }
示例#3
0
 protected void StopMusic()
 {
     ZAudioManager.Stop(this.gameObject);
 }