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); } }
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); } }
protected void StopMusic() { ZAudioManager.Stop(this.gameObject); }