public void PlayBackgroundMusic(string filename, bool loop = false) { if (null == filename) { return; } SharedMusic.Open(FullPath(filename), filename.GetHashCode()); SharedMusic.Play(loop); }
/** * @brief Play background music * @param pszFilePath The path of the background music file,or the FileName of T_SoundResInfo * @param bLoop Whether the background music loop or not */ public void PlayBackgroundMusic(string pszFilePath, bool bLoop) { if (null == pszFilePath) { return; } SharedMusic.Open(FullPath(pszFilePath), pszFilePath.GetHashCode()); SharedMusic.Play(bLoop); }