/////////////////////////////////////////////////////////////
    // private

    private ClockStone.AudioObject PlayBGM(string audioID)
    {
        if (!Preference.LoadPreference(Pref.BGM, true))
        {
            return(null);
        }

        ClockStone.AudioObject currentAudioObj = AudioController.GetCurrentMusic();
        if (currentAudioObj != null && currentAudioObj.audioID.Equals(audioID))
        {
            return(null);
        }

        AudioController.StopMusic();

        return(AudioController.PlayMusic(audioID));
    }
示例#2
0
    private ClockStone.AudioObject PlayBGM(string audioID)
    {
        if (!this.onBGM)
        {
            return(null);
        }

        ClockStone.AudioObject currentAudioObj = AudioController.GetCurrentMusic();
        if (currentAudioObj != null && currentAudioObj.audioID.Equals(audioID))
        {
            return(null);
        }

        AudioController.StopMusic();

        return(AudioController.PlayMusic(audioID));
    }