public void PlayBGM() { if (this.dicMapSound.Count == 0) { return; } TitleScene.MapData mapData = this.dicMapSound[0]; Transform asset = Singleton <Manager.Sound> .Instance.FindAsset(Manager.Sound.Type.BGM, mapData.fileName, mapData.assetPath); if (Object.op_Inequality((Object)asset, (Object)null)) { bool?isPlaying = ((AudioSource)((UnityEngine.Component)asset).GetComponent <AudioSource>())?.get_isPlaying(); bool?nullable = !isPlaying.HasValue ? new bool?() : new bool?(!isPlaying.Value); if ((!nullable.HasValue ? 0 : (nullable.Value ? 1 : 0)) == 0) { return; } Singleton <Manager.Sound> .Instance.PlayBGM(Singleton <Resources> .Instance.SoundPack.BGMInfo.MapBGMFadeTime); } else { Illusion.Game.Utils.Sound.SettingBGM settingBgm = new Illusion.Game.Utils.Sound.SettingBGM(); settingBgm.assetBundleName = mapData.assetPath; settingBgm.assetName = mapData.fileName; Illusion.Game.Utils.Sound.Play((Illusion.Game.Utils.Sound.Setting)settingBgm); } }
private bool LoadMapSeList() { string listAssetBundleName = this.titleListAssetBundleName; TitleData titleData = CommonLib.LoadAsset <TitleData>(listAssetBundleName, "title_se", false, string.Empty); AssetBundleManager.UnloadAssetBundle(listAssetBundleName, true, (string)null, false); foreach (TitleData.Param obj in titleData.param) { if (!this.dicMapSe.ContainsKey(obj.id)) { this.dicMapSe[obj.id] = new TitleScene.MapData(); } TitleScene.MapData mapData = this.dicMapSe[obj.id]; mapData.assetPath = obj.assetPath; mapData.fileName = obj.fileName; mapData.manifest = obj.manifest; } return(true); }