コード例 #1
0
ファイル: Player.cs プロジェクト: yazici/osu
        public override void OnEntering(IScreen last)
        {
            base.OnEntering(last);

            if (!LoadedBeatmapSuccessfully)
            {
                return;
            }

            Alpha = 0;
            this
            .ScaleTo(0.7f)
            .ScaleTo(1, 750, Easing.OutQuint)
            .Delay(250)
            .FadeIn(250);

            ShowStoryboard.ValueChanged += enabled =>
            {
                if (enabled.NewValue)
                {
                    initializeStoryboard(true);
                }
            };

            Background.EnableUserDim.Value = true;

            Background.StoryboardReplacesBackground.BindTo(storyboardReplacesBackground);
            StoryboardContainer.StoryboardReplacesBackground.BindTo(storyboardReplacesBackground);

            storyboardReplacesBackground.Value = Beatmap.Value.Storyboard.ReplacesBackground && Beatmap.Value.Storyboard.HasDrawable;

            Task.Run(() =>
            {
                sourceClock.Reset();

                Schedule(() =>
                {
                    adjustableClock.ChangeSource(sourceClock);
                    applyRateFromMods();

                    this.Delay(750).Schedule(() =>
                    {
                        if (!PausableGameplayContainer.IsPaused.Value)
                        {
                            adjustableClock.Start();
                        }
                    });
                });
            });

            PausableGameplayContainer.Alpha = 0;
            PausableGameplayContainer.FadeIn(750, Easing.OutQuint);
        }
コード例 #2
0
        public override void OnEntering(IScreen last)
        {
            base.OnEntering(last);

            if (!LoadedBeatmapSuccessfully)
            {
                return;
            }

            Alpha = 0;
            this
            .ScaleTo(0.7f)
            .ScaleTo(1, 750, Easing.OutQuint)
            .Delay(250)
            .FadeIn(250);

            ShowStoryboard.ValueChanged += enabled =>
            {
                if (enabled.NewValue)
                {
                    initializeStoryboard(true);
                }
            };

            Background.EnableUserDim.Value = true;

            Background.StoryboardReplacesBackground.BindTo(storyboardReplacesBackground);
            StoryboardContainer.StoryboardReplacesBackground.BindTo(storyboardReplacesBackground);

            storyboardReplacesBackground.Value = Beatmap.Value.Storyboard.ReplacesBackground && Beatmap.Value.Storyboard.HasDrawable;

            gameplayClockContainer.Restart();

            PausableGameplayContainer.Alpha = 0;
            PausableGameplayContainer.FadeIn(750, Easing.OutQuint);
        }