Beispiel #1
0
        // Plays the specified song.
        public static void PlaySong(Song song, bool looped, float volume, float pitch = 0.0f, float pan = 0.0f)
        {
            if (currentSong != null)
            {
                currentSong.Stop();
            }

            currentSong = song;
            song.Play(looped, volume, pitch, pan);
        }
Beispiel #2
0
        //-----------------------------------------------------------------------------
        // Playback
        //-----------------------------------------------------------------------------

        // Plays the specified song.
        public static void PlaySong(Song song, bool looped = true)
        {
            if (currentSong != null)
            {
                currentSong.Stop();
            }

            currentSong = song;
            song.Play(looped);
        }
Beispiel #3
0
        /** <summary> Plays the specified song. </summary> */
        public static void PlaySong(Song song, bool looped, float volume, float pitch = 0.0f, float pan = 0.0f)
        {
            if (currentSong != null)
            currentSong.Stop();

            currentSong = song;
            song.Play(looped, volume, pitch, pan);
        }
Beispiel #4
0
        /** <summary> Plays the specified song. </summary> */
        public static void PlaySong(Song song, bool looped = true)
        {
            if (currentSong != null)
            currentSong.Stop();

            currentSong = song;
            song.Play(looped);
        }