Example #1
0
        private void fadeOut()
        {
            const float fade_out_duration = 250;

            HitRenderer?.FadeOut(fade_out_duration);
            Content.FadeOut(fade_out_duration);

            hudOverlay?.ScaleTo(0.7f, fade_out_duration * 3, EasingTypes.In);

            Background?.FadeTo(1f, fade_out_duration);
        }
Example #2
0
        protected override bool OnExiting(Screen next)
        {
            if (pauseOverlay != null && !HitRenderer.HasReplayLoaded)
            {
                //pause screen override logic.
                if (pauseOverlay?.State == Visibility.Hidden && !canPause)
                {
                    return(true);
                }

                if (!IsPaused && sourceClock.IsRunning) // For if the user presses escape quickly when entering the map
                {
                    Pause();
                    return(true);
                }
            }

            HitRenderer?.FadeOut(60);

            FadeOut(250);
            Content.ScaleTo(0.7f, 750, EasingTypes.InQuint);
            Background?.FadeTo(1f, 200);
            return(base.OnExiting(next));
        }