public Transform OnecePlayChara( int no, string assetBundleName, string assetName, float pitch = 1f, float delayTime = 0.0f, float fadeTime = 0.0f, bool isAsync = true, Transform voiceTrans = null, Voice.Type type = Voice.Type.PCM, int settingNo = -1, bool isPlayEndDelete = true, bool isBundleUnload = true, bool is2D = false) { if (Object.op_Inequality((Object)voiceTrans, (Object)null)) { this.Stop(no, voiceTrans); } else { this.Stop(no); } return(this.Play(no, assetBundleName, assetName, pitch, delayTime, fadeTime, isAsync, voiceTrans, type, settingNo, isPlayEndDelete, isBundleUnload, is2D)); }
public Transform Play( int no, string assetBundleName, string assetName, float pitch = 1f, float delayTime = 0.0f, float fadeTime = 0.0f, bool isAsync = true, Transform voiceTrans = null, Voice.Type type = Voice.Type.PCM, int settingNo = -1, bool isPlayEndDelete = true, bool isBundleUnload = true, bool is2D = false) { LoadVoice loadVoice = (LoadVoice) new GameObject("Voice Loading").AddComponent <LoadVoice>(); loadVoice.no = no; loadVoice.assetBundleName = assetBundleName; loadVoice.assetName = assetName; loadVoice.pitch = pitch; loadVoice.delayTime = delayTime; loadVoice.fadeTime = fadeTime; loadVoice.isAsync = isAsync; loadVoice.voiceTrans = voiceTrans; loadVoice.type = type; loadVoice.settingNo = settingNo; loadVoice.isPlayEndDelete = isPlayEndDelete; loadVoice.isBundleUnload = isBundleUnload; loadVoice.is2D = is2D; Transform parent; return(!this.voiceDic.TryGetValue(no, out parent) ? (Transform)null : Singleton <Sound> .Instance.SetParent(parent, (LoadAudioBase)loadVoice, this.settingObjects[(int)type])); }
private void LoadSetting(Voice.Type type, int settingNo = -1) { string str = type.ToString(); AssetBundleData assetBundleData = new AssetBundleData("sound/setting/object/00.unity3d", str.ToLower()); GameObject gameObject = (GameObject)Object.Instantiate <GameObject>((M0)assetBundleData.GetAsset <GameObject>(), this.rootSetting, false); ((Object)gameObject).set_name(str + "_Setting"); Singleton <Sound> .Instance.AudioSettingData((AudioSource)gameObject.GetComponent <AudioSource>(), settingNo); this.settingObjects[(int)type] = gameObject; assetBundleData.UnloadBundle(true, false); }
public Transform OnecePlay( int no, string assetBundleName, string assetName, float pitch = 1f, float delayTime = 0.0f, float fadeTime = 0.0f, bool isAsync = true, Transform voiceTrans = null, Voice.Type type = Voice.Type.PCM, int settingNo = -1, bool isPlayEndDelete = true, bool isBundleUnload = true, bool is2D = false) { this.StopAll(true); return(this.Play(no, assetBundleName, assetName, pitch, delayTime, fadeTime, isAsync, voiceTrans, type, settingNo, isPlayEndDelete, isBundleUnload, is2D)); }