예제 #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);
            }
        }
예제 #2
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);
            }
        }
예제 #3
0
        protected override void LogoArriving(OsuLogo logo, bool resuming)
        {
            base.LogoArriving(logo, resuming);

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

            if (!resuming)
            {
                // generally this can never be null
                // an exception is running ruleset tests, where the osu! ruleset may not be present (causing importing the intro to fail).
                if (initialBeatmap != null)
                {
                    beatmap.Value = initialBeatmap;
                }
                Track = beatmap.Value.Track;

                // ensure the track starts at maximum volume
                musicController.CurrentTrack.FinishTransforms();

                logo.MoveTo(new Vector2(0.5f));
                logo.ScaleTo(Vector2.One);
                logo.Hide();
            }
            else
            {
                const int quick_appear        = 350;
                int       initialMovementTime = logo.Alpha > 0.2f ? quick_appear : 0;

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

                logo
                .ScaleTo(1, initialMovementTime, Easing.OutQuint)
                .FadeIn(quick_appear, Easing.OutQuint)
                .Then()
                .RotateTo(20, exit_delay * 1.5f)
                .FadeOut(exit_delay);
            }
        }
예제 #4
0
파일: IntroScreen.cs 프로젝트: hbnrmx/osu
        protected override void LogoArriving(OsuLogo logo, bool resuming)
        {
            base.LogoArriving(logo, resuming);

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

            if (!resuming)
            {
                beatmap.Value    = initialBeatmap;
                Track            = initialBeatmap.Track;
                UsingThemedIntro = !initialBeatmap.Track.IsDummyDevice;

                // ensure the track starts at maximum volume
                musicController.CurrentTrack.FinishTransforms();

                logo.MoveTo(new Vector2(0.5f));
                logo.ScaleTo(Vector2.One);
                logo.Hide();
            }
            else
            {
                const int quick_appear        = 350;
                var       initialMovementTime = logo.Alpha > 0.2f ? quick_appear : 0;

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

                logo
                .ScaleTo(1, initialMovementTime, Easing.OutQuint)
                .FadeIn(quick_appear, Easing.OutQuint)
                .Then()
                .RotateTo(20, exit_delay * 1.5f)
                .FadeOut(exit_delay);
            }
        }
예제 #5
0
        private void updateLogoState(ButtonSystemState lastState = ButtonSystemState.Initial)
        {
            if (logo == null)
            {
                return;
            }

            switch (state)
            {
            case ButtonSystemState.Exit:
            case ButtonSystemState.Initial:
                logoDelayedAction?.Cancel();
                logoDelayedAction = Scheduler.AddDelayed(() =>
                {
                    logoTracking = false;

                    game?.Toolbar.Hide();

                    logo.ClearTransforms(targetMember: nameof(Position));
                    logo.RelativePositionAxes = Axes.Both;

                    logo.MoveTo(new Vector2(0.5f), 800, Easing.OutExpo);
                    logo.ScaleTo(1, 800, Easing.OutExpo);
                }, buttonArea.Alpha * 150);
                break;

            case ButtonSystemState.TopLevel:
            case ButtonSystemState.Play:
                switch (lastState)
                {
                case ButtonSystemState.TopLevel:         // coming from toplevel to play
                    break;

                case ButtonSystemState.Initial:
                    logo.ClearTransforms(targetMember: nameof(Position));
                    logo.RelativePositionAxes = Axes.None;

                    bool impact = logo.Scale.X > 0.6f;

                    if (lastState == ButtonSystemState.Initial)
                    {
                        logo.ScaleTo(0.5f, 200, Easing.In);
                    }

                    logo.MoveTo(logoTrackingPosition, lastState == ButtonSystemState.EnteringMode ? 0 : 200, Easing.In);

                    logoDelayedAction?.Cancel();
                    logoDelayedAction = Scheduler.AddDelayed(() =>
                    {
                        logoTracking = true;

                        if (impact)
                        {
                            logo.Impact();
                        }

                        game?.Toolbar.Show();
                    }, 200);
                    break;

                default:
                    logo.ClearTransforms(targetMember: nameof(Position));
                    logo.RelativePositionAxes = Axes.None;
                    logoTracking = true;
                    logo.ScaleTo(0.5f, 200, Easing.OutQuint);
                    break;
                }

                break;

            case ButtonSystemState.EnteringMode:
                logoTracking = true;
                break;
            }
        }
예제 #6
0
파일: ButtonSystem.cs 프로젝트: thlonux/osu
        private void updateLogoState(MenuState lastState = MenuState.Initial)
        {
            if (logo == null)
            {
                return;
            }

            logoDelayedAction?.Cancel();

            switch (state)
            {
            case MenuState.Exit:
            case MenuState.Initial:
                logoTracking = false;

                logoDelayedAction = Scheduler.AddDelayed(() =>
                {
                    showOverlays.Value = false;

                    logo.ClearTransforms(targetMember: nameof(Position));
                    logo.RelativePositionAxes = Axes.Both;

                    logo.MoveTo(new Vector2(0.5f), 800, Easing.OutExpo);
                    logo.ScaleTo(1, 800, Easing.OutExpo);
                }, 150);

                break;

            case MenuState.TopLevel:
            case MenuState.Play:
                logo.ClearTransforms(targetMember: nameof(Position));
                logo.RelativePositionAxes = Axes.None;

                switch (lastState)
                {
                case MenuState.TopLevel:         // coming from toplevel to play
                case MenuState.Initial:
                    logoTracking = false;
                    logo.ScaleTo(0.5f, 200, Easing.In);

                    logo.MoveTo(logoTrackingPosition, lastState == MenuState.EnteringMode ? 0 : 200, Easing.In);

                    logoDelayedAction = Scheduler.AddDelayed(() =>
                    {
                        logoTracking = true;

                        logo.Impact();
                        showOverlays.Value = true;
                    }, 200);
                    break;

                default:
                    logoTracking = true;
                    logo.ScaleTo(0.5f, 200, Easing.OutQuint);
                    break;
                }
                break;

            case MenuState.EnteringMode:
                logoTracking = true;
                break;
            }
        }