// 播放背景音乐
export let _curBgMusic:egret.Sound = null;
export let _curBgMusicUrl:string = null;
export let _curBgMusicChannel:egret.SoundChannel = null;
export function playBgMusic(url) {
if (!mo.PROJ.bgMusicEnabled) return;
if (_curBgMusicUrl == url) return;
_curBgMusicUrl = url;
if (_curBgMusicChannel) _curBgMusicChannel.stop();
mo.R.loadTo('global', url, function () {
if (_curBgMusicChannel) _curBgMusicChannel.stop();
egret 音乐播放
最新推荐文章于 2021-11-03 16:31:11 发布