SunsetHigh.BGMusic.setPaused C# (CSharp) Method

setPaused() public static method

Sets whether the soundtrack is paused or not
public static setPaused ( bool pause ) : void
pause bool
return void
        public static void setPaused(bool pause)
        {
            if (wavePlayer != null && file != null)
            {
                if (pause)
                {
                    wavePlayer.Pause();
                    playing = false;
                }
                else
                {
                    wavePlayer.Play();
                    playing = true;
                }
            }
            paused = pause;
        }