コード例 #1
0
ファイル: DrawableJudgement.cs プロジェクト: Nope10/osu
        protected virtual void ApplyHitAnimations()
        {
            JudgementBody.ScaleTo(0.9f);
            JudgementBody.ScaleTo(1, 500, Easing.OutElastic);

            this.Delay(FadeOutDelay).FadeOut(400);
        }
コード例 #2
0
        protected override void ApplyHitAnimations()
        {
            JudgementBody.ScaleTo(0.8f);
            JudgementBody.ScaleTo(1, 250, Easing.OutElastic);

            JudgementBody.Delay(FadeInDuration).ScaleTo(0.75f, 250);
            this.Delay(FadeInDuration).FadeOut(200);
        }
コード例 #3
0
        protected override void ApplyHitAnimations()
        {
            if (lighting != null)
            {
                JudgementBody.Delay(FadeInDuration).FadeOut(400);

                lighting.ScaleTo(0.8f).ScaleTo(1.2f, 600, Easing.Out);
                lighting.FadeIn(200).Then().Delay(200).FadeOut(1000);
            }

            JudgementText?.TransformSpacingTo(new Vector2(14, 0), 1800, Easing.OutQuint);
            base.ApplyHitAnimations();
        }
コード例 #4
0
        protected override void LoadComplete()
        {
            base.LoadComplete();

            this.FadeInFromZero(50, Easing.OutQuint);

            if (Result.IsHit)
            {
                JudgementBody.ScaleTo(0.8f);
                JudgementBody.ScaleTo(1, 250, Easing.OutElastic);

                JudgementBody.Delay(50).ScaleTo(0.75f, 250);
                this.Delay(50).FadeOut(200);
            }

            Expire();
        }
コード例 #5
0
        private void runAnimation()
        {
            // undo any transforms applies in ApplyMissAnimations/ApplyHitAnimations to get a sane initial state.
            ApplyTransformsAt(double.MinValue, true);
            ClearTransforms(true);

            LifetimeStart = Result.TimeAbsolute;

            using (BeginAbsoluteSequence(Result.TimeAbsolute, true))
            {
                // not sure if this should remain going forward.
                JudgementBody.ResetAnimation();

                switch (Result.Type)
                {
                case HitResult.None:
                    break;

                case HitResult.Miss:
                    ApplyMissAnimations();
                    break;

                default:
                    ApplyHitAnimations();
                    break;
                }

                if (JudgementBody.Drawable is IAnimatableJudgement animatable)
                {
                    var drawableAnimation = (Drawable)animatable;

                    animatable.PlayAnimation();

                    // a derived version of DrawableJudgement may be proposing a lifetime.
                    // if not adjusted (or the skinned portion requires greater bounds than calculated) use the skinned source's lifetime.
                    double lastTransformTime = drawableAnimation.LatestTransformEndTime;
                    if (LifetimeEnd == double.MaxValue || lastTransformTime > LifetimeEnd)
                    {
                        LifetimeEnd = lastTransformTime;
                    }
                }
            }
        }
コード例 #6
0
        protected override void ApplyMissAnimations()
        {
            if (!(JudgementBody.Drawable is DefaultManiaJudgementPiece))
            {
                // this is temporary logic until mania's skin transformer returns IAnimatableJudgements
                JudgementBody.ScaleTo(1.6f);
                JudgementBody.ScaleTo(1, 100, Easing.In);

                JudgementBody.MoveTo(Vector2.Zero);
                JudgementBody.MoveToOffset(new Vector2(0, 100), 800, Easing.InQuint);

                JudgementBody.RotateTo(0);
                JudgementBody.RotateTo(40, 800, Easing.InQuint);
                JudgementBody.FadeOutFromOne(800);

                LifetimeEnd = JudgementBody.LatestTransformEndTime;
            }

            base.ApplyMissAnimations();
        }
コード例 #7
0
        protected override void ApplyHitAnimations()
        {
            bool hitLightingEnabled = config.Get <bool>(OsuSetting.HitLighting);

            if (hitLightingEnabled)
            {
                JudgementBody.FadeIn().Delay(FadeInDuration).FadeOut(400);

                Lighting.ScaleTo(0.8f).ScaleTo(1.2f, 600, Easing.Out);
                Lighting.FadeIn(200).Then().Delay(200).FadeOut(1000);
            }
            else
            {
                JudgementBody.Alpha = 1;
            }

            fadeOutDelay = hitLightingEnabled ? 1400 : base.FadeOutDelay;

            JudgementText?.TransformSpacingTo(Vector2.Zero).Then().TransformSpacingTo(new Vector2(14, 0), 1800, Easing.OutQuint);
            base.ApplyHitAnimations();
        }
コード例 #8
0
ファイル: DrawableJudgement.cs プロジェクト: Nope10/osu
        protected override void PrepareForUse()
        {
            base.PrepareForUse();

            Debug.Assert(Result != null);

            prepareDrawables();

            bodyDrawable.ResetAnimation();

            this.FadeInFromZero(FadeInDuration, Easing.OutQuint);
            JudgementBody.ScaleTo(1);
            JudgementBody.RotateTo(0);
            JudgementBody.MoveTo(Vector2.Zero);

            switch (Result.Type)
            {
            case HitResult.None:
                break;

            case HitResult.Miss:
                JudgementBody.ScaleTo(1.6f);
                JudgementBody.ScaleTo(1, 100, Easing.In);

                JudgementBody.MoveToOffset(new Vector2(0, 100), 800, Easing.InQuint);
                JudgementBody.RotateTo(40, 800, Easing.InQuint);

                this.Delay(600).FadeOut(200);
                break;

            default:
                ApplyHitAnimations();
                break;
            }

            Expire(true);
        }