Пример #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);
        }
Пример #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);
        }
Пример #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);
        }
Пример #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);
        }