예제 #1
0
 public void playBackgroundMusic(string pszFilePath, bool bLoop)
 {
     if (pszFilePath == null)
     {
         return;
     }
     SimpleAudioEngine.sharedMusic().Open(SimpleAudioEngine._FullPath(pszFilePath), SimpleAudioEngine._Hash(pszFilePath));
     SimpleAudioEngine.sharedMusic().Play(bLoop);
 }
예제 #2
0
        public void preloadEffect(string pszFilePath)
        {
            if (pszFilePath.Length <= 0)
            {
                return;
            }
            uint num = SimpleAudioEngine._Hash(pszFilePath);

            if (SimpleAudioEngine.sharedList().ContainsKey(num))
            {
                return;
            }
            EffectPlayer effectPlayer = new EffectPlayer();

            effectPlayer.Open(SimpleAudioEngine._FullPath(pszFilePath), num);
            SimpleAudioEngine.sharedList().Add(num, effectPlayer);
        }
예제 #3
0
 public void preloadBackgroundMusic(string pszFilePath)
 {
     SimpleAudioEngine.sharedMusic().Open(SimpleAudioEngine._FullPath(pszFilePath), SimpleAudioEngine._Hash(pszFilePath));
 }