MegaMan.Engine.Music.FadeOut C# (CSharp) Method

FadeOut() public method

public FadeOut ( int frames ) : void
frames int
return void
        public void FadeOut(int frames)
        {
            if (!Playing) return;

            if (channel != null)
            {
                float fadeamt = 1.0f / frames;
                Engine.Instance.DelayedCall(Stop, i => { Volume -= fadeamt; }, frames);
            }
        }