public void unloadEffect(string pszFilePath) { uint num = SimpleAudioEngine._Hash(pszFilePath); if (SimpleAudioEngine.sharedList().ContainsKey(num)) { SimpleAudioEngine.sharedList().Remove(num); } }
public uint playEffect(string pszFilePath, bool bLoop) { uint num = SimpleAudioEngine._Hash(pszFilePath); this.preloadEffect(pszFilePath); foreach (KeyValuePair <uint, EffectPlayer> keyValuePair in SimpleAudioEngine.sharedList()) { if (num != keyValuePair.Key) { continue; } keyValuePair.Value.Play(bLoop); } return(num); }
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); }
public void playBackgroundMusic(string pszFilePath, bool bLoop) { if (pszFilePath == null) { return; } SimpleAudioEngine.sharedMusic().Open(SimpleAudioEngine._FullPath(pszFilePath), SimpleAudioEngine._Hash(pszFilePath)); SimpleAudioEngine.sharedMusic().Play(bLoop); }
public void preloadBackgroundMusic(string pszFilePath) { SimpleAudioEngine.sharedMusic().Open(SimpleAudioEngine._FullPath(pszFilePath), SimpleAudioEngine._Hash(pszFilePath)); }