示例#1
0
        public void PlayBackgroundMusic(AmbientFXSounds track)
        {
            //or AMBIENT SOUND FX
            musicChoice = track;
            CCSimpleAudioEngine.SharedEngine.StopBackgroundMusic();

            if (!ambientFXTurnedOff)
            {
                if (musicChoice == AmbientFXSounds.Frogs)
                {
                    CCSimpleAudioEngine.SharedEngine.PlayBackgroundMusic(FormatSoundFilePath("birds"), true);
                }
                else if (musicChoice == AmbientFXSounds.Insects)
                {
                    CCSimpleAudioEngine.SharedEngine.PlayBackgroundMusic(FormatSoundFilePath("frogs"), true);
                }
            }
        }
示例#2
0
        public void PlayBackgroundMusic(AmbientFXSounds track)
        {
            //or AMBIENT SOUND FX

            musicChoice = track;

            SimpleAudioEngine.SharedEngine.StopBackgroundMusic();

            if ( !ambientFXTurnedOff ) {

                if ( musicChoice == AmbientFXSounds.Frogs ) {
                    SimpleAudioEngine.SharedEngine.PlayBackgroundMusic(FormatSoundFilePath("birds.mp3"), true);
                }  else if ( musicChoice == AmbientFXSounds.Insects ) {
                    SimpleAudioEngine.SharedEngine.PlayBackgroundMusic(FormatSoundFilePath("frogs.mp3"), true);
                }

            }
        }