Beispiel #1
0
        protected override void LogoArriving(OsuLogo logo, bool resuming)
        {
            base.LogoArriving(logo, resuming);

            logo.RelativePositionAxes = Axes.Both;
            logo.Colour = Color4.White;
            logo.Ripple = false;

            const int quick_appear = 350;

            int initialMovementTime = logo.Alpha > 0.2f ? quick_appear : 0;

            logo.MoveTo(new Vector2(0.5f), initialMovementTime, Easing.OutQuint);

            if (!resuming)
            {
                logo.ScaleTo(1);
                logo.FadeIn();
                logo.PlayIntro();
            }
            else
            {
                logo.Triangles = false;

                logo
                .ScaleTo(1, initialMovementTime, Easing.OutQuint)
                .FadeIn(quick_appear, Easing.OutQuint)
                .Then()
                .RotateTo(20, EXIT_DELAY * 1.5f)
                .FadeOut(EXIT_DELAY);
            }
        }
Beispiel #2
0
        protected override void OnEntering(Screen last)
        {
            base.OnEntering(last);

            if (menuVoice)
            {
                welcome.Play();
            }

            Scheduler.AddDelayed(delegate
            {
                // Only start the current track if it is the menu music. A beatmap's track is started when entering the Main Manu.
                if (menuMusic)
                {
                    track.Start();
                }

                LoadComponentAsync(mainMenu = new MainMenu());

                Scheduler.AddDelayed(delegate
                {
                    DidLoadMenu = true;
                    Push(mainMenu);
                }, 2300);
            }, 600);

            logo.ScaleTo(0.4f);
            logo.FadeOut();

            logo.ScaleTo(1, 4400, Easing.OutQuint);
            logo.FadeIn(20000, Easing.OutQuint);
        }
Beispiel #3
0
        protected override void LogoArriving(OsuLogo logo, bool resuming)
        {
            base.LogoArriving(logo, resuming);

            buttons.SetOsuLogo(logo);

            logo.FadeColour(Color4.White, 100, Easing.OutQuint);
            logo.FadeIn(100, Easing.OutQuint);

            if (resuming)
            {
                buttons.State = ButtonSystemState.TopLevel;

                this.FadeIn(FADE_IN_DURATION, Easing.OutQuint);
                buttonsContainer.MoveTo(new Vector2(0, 0), FADE_IN_DURATION, Easing.OutQuint);

                sideFlashes.Delay(FADE_IN_DURATION).FadeIn(64, Easing.InQuint);
            }
            else if (!api.IsLoggedIn)
            {
                logo.Action += displayLogin;
            }

            bool displayLogin()
            {
                if (!loginDisplayed.Value)
                {
                    Scheduler.AddDelayed(() => login?.Show(), 500);
                    loginDisplayed.Value = true;
                }

                return(true);
            }
        }
Beispiel #4
0
        protected override void OnEntering(Screen last)
        {
            base.OnEntering(last);

            welcome.Play();

            Scheduler.AddDelayed(delegate
            {
                bgm.Start();

                (mainMenu = new MainMenu()).LoadAsync(Game);

                Scheduler.AddDelayed(delegate
                {
                    DidLoadMenu = true;
                    Push(mainMenu);
                }, 2300);
            }, 600);

            logo.ScaleTo(0.4f);
            logo.FadeOut();

            logo.ScaleTo(1, 4400, EasingTypes.OutQuint);
            logo.FadeIn(20000, EasingTypes.OutQuint);
        }
Beispiel #5
0
        protected override void LogoArriving(OsuLogo logo, bool resuming)
        {
            base.LogoArriving(logo, resuming);

            if (!resuming)
            {
                Beatmap.Value = introBeatmap;
                introBeatmap  = null;

                welcome?.Play();

                Scheduler.AddDelayed(delegate
                {
                    // Only start the current track if it is the menu music. A beatmap's track is started when entering the Main Manu.
                    if (menuMusic.Value)
                    {
                        track.Restart();
                        track = null;
                    }

                    PrepareMenuLoad();

                    Scheduler.AddDelayed(LoadMenu, delay_step_one);
                }, delay_step_two);

                logo.ScaleTo(1);
                logo.FadeIn();
                logo.PlayIntro();
            }
        }
Beispiel #6
0
        protected override void OnEntering(Screen last)
        {
            base.OnEntering(last);

            if (menuVoice)
            {
                welcome.Play();
            }

            Scheduler.AddDelayed(delegate
            {
                if (menuMusic)
                {
                    bgm.Start();
                }

                LoadComponentAsync(mainMenu = new MainMenu());

                Scheduler.AddDelayed(delegate
                {
                    DidLoadMenu = true;
                    Push(mainMenu);
                }, 2300);
            }, 600);

            logo.ScaleTo(0.4f);
            logo.FadeOut();

            logo.ScaleTo(1, 4400, EasingTypes.OutQuint);
            logo.FadeIn(20000, EasingTypes.OutQuint);
        }
Beispiel #7
0
        protected override void LogoArriving(OsuLogo logo, bool resuming)
        {
            base.LogoArriving(logo, resuming);

            if (!resuming)
            {
                Beatmap.Value = introBeatmap;
                introBeatmap  = null;

                if (menuVoice.Value)
                {
                    welcome.Play();
                }

                Scheduler.AddDelayed(delegate
                {
                    // Only start the current track if it is the menu music. A beatmap's track is started when entering the Main Manu.
                    if (menuMusic.Value)
                    {
                        track.Start();
                        track = null;
                    }

                    LoadComponentAsync(mainMenu = new MainMenu());

                    Scheduler.AddDelayed(delegate
                    {
                        DidLoadMenu = true;
                        this.Push(mainMenu);
                    }, delay_step_one);
                }, delay_step_two);
            }

            logo.Colour = Color4.White;
            logo.Ripple = false;

            const int quick_appear = 350;

            int initialMovementTime = logo.Alpha > 0.2f ? quick_appear : 0;

            logo.MoveTo(new Vector2(0.5f), initialMovementTime, Easing.OutQuint);

            if (!resuming)
            {
                logo.ScaleTo(1);
                logo.FadeIn();
                logo.PlayIntro();
            }
            else
            {
                logo.Triangles = false;

                logo
                .ScaleTo(1, initialMovementTime, Easing.OutQuint)
                .FadeIn(quick_appear, Easing.OutQuint)
                .Then()
                .RotateTo(20, EXIT_DELAY * 1.5f)
                .FadeOut(EXIT_DELAY);
            }
        }
Beispiel #8
0
        protected override void LoadComplete()
        {
            base.LoadComplete();
            Scheduler.Add(delegate
            {
                welcome.Play();

                Scheduler.AddDelayed(delegate
                {
                    bgm.Start();

                    mainMenu = new MainMenu();
                    mainMenu.Preload(Game);

                    Scheduler.AddDelayed(delegate
                    {
                        DidLoadMenu = true;
                        Push(mainMenu);
                    }, 2300);
                }, 600);
            });

            logo.ScaleTo(0.4f);
            logo.FadeOut();

            logo.ScaleTo(1, 4400, EasingTypes.OutQuint);
            logo.FadeIn(20000, EasingTypes.OutQuint);
        }
Beispiel #9
0
        protected override void LogoArriving(OsuLogo logo, bool resuming)
        {
            base.LogoArriving(logo, resuming);

            if (!resuming)
            {
                Track.Looping = true;

                LoadComponentAsync(new WelcomeIntroSequence
                {
                    RelativeSizeAxes = Axes.Both
                }, intro =>
                {
                    PrepareMenuLoad();

                    AddInternal(intro);

                    if (skinnableWelcome != null)
                    {
                        skinnableWelcome.Play();
                    }
                    else
                    {
                        welcome?.Play();
                    }

                    var reverbChannel = pianoReverb?.Play();
                    if (reverbChannel != null)
                    {
                        intro.LogoVisualisation.AddAmplitudeSource(reverbChannel);
                    }

                    Scheduler.AddDelayed(() =>
                    {
                        StartTrack();

                        // this classic intro loops forever.
                        if (UsingThemedIntro)
                        {
                            Track.Looping = true;
                        }

                        const float fade_in_time = 200;

                        logo.ScaleTo(1);
                        logo.FadeIn(fade_in_time);

                        background.FadeIn(fade_in_time);

                        LoadMenu();
                    }, delay_step_two);
                });
            }
        }
Beispiel #10
0
        protected override void LogoArriving(OsuLogo logo, bool resuming)
        {
            base.LogoArriving(logo, resuming);

            buttons.SetOsuLogo(logo);

            logo.FadeColour(Color4.White, 100, Easing.OutQuint);
            logo.FadeIn(100, Easing.OutQuint);

            if (resuming)
            {
                buttons.State = ButtonSystemState.TopLevel;

                this.FadeIn(FADE_IN_DURATION, Easing.OutQuint);
                this.MoveTo(new Vector2(0, 0), FADE_IN_DURATION, Easing.OutQuint);

                sideFlashes.Delay(FADE_IN_DURATION).FadeIn(64, Easing.InQuint);
            }
        }
Beispiel #11
0
        protected override void LogoArriving(OsuLogo logo, bool resuming)
        {
            base.LogoArriving(logo, resuming);

            buttons.SetOsuLogo(logo);

            logo.FadeColour(Color4.White, 100, Easing.OutQuint);
            logo.FadeIn(100, Easing.OutQuint);

            if (resuming)
            {
                buttons.State = MenuState.TopLevel;

                const float length = 300;

                Content.FadeIn(length, Easing.OutQuint);
                Content.MoveTo(new Vector2(0, 0), length, Easing.OutQuint);

                sideFlashes.Delay(length).FadeIn(64, Easing.InQuint);
            }
        }
Beispiel #12
0
        protected override void LogoArriving(OsuLogo logo, bool resuming)
        {
            base.LogoArriving(logo, resuming);

            buttons.SetOsuLogo(logo);

            logo.FadeColour(Color4.White, 100, Easing.OutQuint);
            logo.FadeIn(100, Easing.OutQuint);

            if (resuming)
            {
                buttons.State = ButtonSystemState.TopLevel;

                this.FadeIn(FADE_IN_DURATION, Easing.OutQuint);
                buttonsContainer.MoveTo(new Vector2(0, 0), FADE_IN_DURATION, Easing.OutQuint);

                sideFlashes.Delay(FADE_IN_DURATION).FadeIn(64, Easing.InQuint);
            }
            else if (!api.IsLoggedIn)
            {
                // copy out old action to avoid accidentally capturing logo.Action in closure, causing a self-reference loop.
                var previousAction = logo.Action;

                // we want to hook into logo.Action to display the login overlay, but also preserve the return value of the old action.
                // therefore pass the old action to displayLogin, so that it can return that value.
                // this ensures that the OsuLogo sample does not play when it is not desired.
                logo.Action = () => displayLogin(previousAction);
            }

            bool displayLogin(Func <bool> originalAction)
            {
                if (!loginDisplayed.Value)
                {
                    Scheduler.AddDelayed(() => login?.Show(), 500);
                    loginDisplayed.Value = true;
                }

                return(originalAction.Invoke());
            }
        }
        protected override void LogoArriving(OsuLogo logo, bool resuming)
        {
            base.LogoArriving(logo, resuming);

            if (!resuming)
            {
                welcome?.Play();

                Scheduler.AddDelayed(delegate
                {
                    StartTrack();

                    PrepareMenuLoad();

                    Scheduler.AddDelayed(LoadMenu, delay_step_one);
                }, delay_step_two);

                logo.ScaleTo(1);
                logo.FadeIn();
                logo.PlayIntro();
            }
        }
        protected override void LogoArriving(OsuLogo logo, bool resuming)
        {
            base.LogoArriving(logo, resuming);

            if (!resuming)
            {
                Track.Looping = true;

                LoadComponentAsync(new WelcomeIntroSequence
                {
                    RelativeSizeAxes = Axes.Both
                }, intro =>
                {
                    PrepareMenuLoad();

                    intro.LogoVisualisation.AddAmplitudeSource(pianoReverb);

                    AddInternal(intro);

                    welcome?.Play();
                    pianoReverb?.Play();

                    Scheduler.AddDelayed(() =>
                    {
                        StartTrack();

                        const float fade_in_time = 200;

                        logo.ScaleTo(1);
                        logo.FadeIn(fade_in_time);

                        background.FadeIn(fade_in_time);

                        LoadMenu();
                    }, delay_step_two);
                });
            }
        }