예제 #1
0
        /**
         * @brief Preload background music
         * @param pszFilePath The path of the background music file,or the FileName of T_SoundResInfo
         */

        public void PreloadBackgroundMusic(string pszFilePath)
        {
            if (_NoAudioHardware)
            {
                return;
            }
            SharedMusic.Open(FullPath(pszFilePath), pszFilePath.GetHashCode());
        }
예제 #2
0
        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);
        }
예제 #4
0
 public void PreloadBackgroundMusic(string filename)
 {
     SharedMusic.Open(FullPath(filename), filename.GetHashCode());
 }
        /**
         * @brief Preload background music
         * @param pszFilePath The path of the background music file,or the FileName of T_SoundResInfo
         */

        public void PreloadBackgroundMusic(string pszFilePath)
        {
            SharedMusic.Open(FullPath(pszFilePath), pszFilePath.GetHashCode());
        }