public void Play() { this.Stop(); if (this.LoopFlag) { MySound.EType type = MySound.EType.SE; if (!string.IsNullOrEmpty(this.CueName)) { if (this.CueName.StartsWith("BGM_")) { type = MySound.EType.BGM; } else if (this.CueName.StartsWith("JIN_")) { type = MySound.EType.JINGLE; } else if (this.CueName.StartsWith("VO_")) { type = MySound.EType.VOICE; } } this.mPlayHandle = MonoSingleton <MySound> .Instance.PlayLoop(this.CueSheet, this.CueName, type, 0.0f); } else { MonoSingleton <MySound> .Instance.PlayOneShot(this.CueSheet, this.CueName, MySound.EType.SE, 0.0f); } }
public void Setup(string sheetName, string cueID, MySound.EType type, int repeatCount, float repeatWait, float stopSec, float fadeOutSec, bool useCustom, MySound.CueSheetHandle.ELoopFlag customLoopFlag, float customDelaySec) { this.mCueID = cueID; this.mPlayCount = repeatCount + 1; this.RepeatWait = repeatWait; this.mStopSec = stopSec; this.mStop = (double)stopSec > 0.0; this.mFadeOutSec = fadeOutSec; this.mUseCustomPlay = useCustom; this.mCustomLoopFlag = customLoopFlag; this.mCustomDelaySec = customDelaySec; this.mHandle = MySound.CueSheetHandle.Create(sheetName, type, true, true, false); this.mHandle.CreateDefaultOneShotSource(); }