Beispiel #1
0
            private void updateState(DrawableHitObject hitObject, ArmedState state)
            {
                if (state == ArmedState.Idle || hitAnimations.Value)
                {
                    return;
                }

                if (hitObject is DrawableHitCircle circle)
                {
                    circle.ApproachCircle
                    .FadeOutFromOne(EDITOR_HIT_OBJECT_FADE_OUT_EXTENSION * 4)
                    .Expire();

                    circle.ApproachCircle.ScaleTo(1.1f, 300, Easing.OutQuint);
                }

                if (hitObject is IHasMainCirclePiece mainPieceContainer)
                {
                    // clear any explode animation logic.
                    // this is scheduled after children to ensure that the clear happens after invocations of ApplyCustomUpdateState on the circle piece's nested skinnables.
                    ScheduleAfterChildren(() =>
                    {
                        if (hitObject.HitObject == null)
                        {
                            return;
                        }

                        mainPieceContainer.CirclePiece.ApplyTransformsAt(hitObject.StateUpdateTime, true);
                        mainPieceContainer.CirclePiece.ClearTransformsAfter(hitObject.StateUpdateTime, true);
                    });
                }

                if (hitObject is DrawableSliderRepeat repeat)
                {
                    repeat.Arrow.ApplyTransformsAt(hitObject.StateUpdateTime, true);
                    repeat.Arrow.ClearTransformsAfter(hitObject.StateUpdateTime, true);
                }

                // adjust the visuals of top-level object types to make them stay on screen for longer than usual.
                switch (hitObject)
                {
                case DrawableSlider _:
                case DrawableHitCircle _:
                    // Get the existing fade out transform
                    var existing = hitObject.Transforms.LastOrDefault(t => t.TargetMember == nameof(Alpha));

                    if (existing == null)
                    {
                        return;
                    }

                    hitObject.RemoveTransform(existing);

                    using (hitObject.BeginAbsoluteSequence(hitObject.HitStateUpdateTime))
                        hitObject.FadeOut(EDITOR_HIT_OBJECT_FADE_OUT_EXTENSION).Expire();
                    break;
                }
            }
            private void updateState(DrawableHitObject hitObject, ArmedState state)
            {
                if (state == ArmedState.Idle || hitAnimations.Value)
                {
                    return;
                }

                if (hitObject is DrawableHitCircle circle)
                {
                    circle.ApproachCircle
                    .FadeOutFromOne(editor_hit_object_fade_out_extension * 4)
                    .Expire();

                    circle.ApproachCircle.ScaleTo(1.1f, 300, Easing.OutQuint);
                }

                if (hitObject is IHasMainCirclePiece mainPieceContainer)
                {
                    // clear any explode animation logic.
                    mainPieceContainer.CirclePiece.ApplyTransformsAt(hitObject.HitStateUpdateTime, true);
                    mainPieceContainer.CirclePiece.ClearTransformsAfter(hitObject.HitStateUpdateTime, true);
                }

                if (hitObject is DrawableSliderRepeat repeat)
                {
                    repeat.Arrow.ApplyTransformsAt(hitObject.HitStateUpdateTime, true);
                    repeat.Arrow.ClearTransformsAfter(hitObject.HitStateUpdateTime, true);
                }

                // adjust the visuals of top-level object types to make them stay on screen for longer than usual.
                switch (hitObject)
                {
                case DrawableSlider _:
                case DrawableHitCircle _:
                    // Get the existing fade out transform
                    var existing = hitObject.Transforms.LastOrDefault(t => t.TargetMember == nameof(Alpha));

                    if (existing == null)
                    {
                        return;
                    }

                    hitObject.RemoveTransform(existing);

                    using (hitObject.BeginAbsoluteSequence(hitObject.HitStateUpdateTime))
                        hitObject.FadeOut(editor_hit_object_fade_out_extension).Expire();
                    break;
                }
            }
Beispiel #3
0
            private void updateState(DrawableHitObject hitObject, ArmedState state)
            {
                if (state == ArmedState.Idle || hitAnimations.Value)
                {
                    return;
                }

                // adjust the visuals of certain object types to make them stay on screen for longer than usual.
                switch (hitObject)
                {
                default:
                    // there are quite a few drawable hit types we don't want to extend (spinners, ticks etc.)
                    return;

                case DrawableSlider _:
                    // no specifics to sliders but let them fade slower below.
                    break;

                case DrawableHitCircle circle:     // also handles slider heads
                    circle.ApproachCircle
                    .FadeOutFromOne(editor_hit_object_fade_out_extension * 4)
                    .Expire();

                    circle.ApproachCircle.ScaleTo(1.1f, 300, Easing.OutQuint);

                    var circlePieceDrawable = circle.CirclePiece.Drawable;

                    // clear any explode animation logic.
                    circlePieceDrawable.ApplyTransformsAt(circle.HitStateUpdateTime, true);
                    circlePieceDrawable.ClearTransformsAfter(circle.HitStateUpdateTime, true);

                    break;
                }

                // Get the existing fade out transform
                var existing = hitObject.Transforms.LastOrDefault(t => t.TargetMember == nameof(Alpha));

                if (existing == null)
                {
                    return;
                }

                hitObject.RemoveTransform(existing);

                using (hitObject.BeginAbsoluteSequence(hitObject.HitStateUpdateTime))
                    hitObject.FadeOut(editor_hit_object_fade_out_extension).Expire();
            }
Beispiel #4
0
        private void updateState(DrawableHitObject hitObject, ArmedState state)
        {
            switch (state)
            {
            case ArmedState.Miss:
                // Get the existing fade out transform
                var existing = hitObject.Transforms.LastOrDefault(t => t.TargetMember == nameof(Alpha));
                if (existing == null)
                {
                    return;
                }

                hitObject.RemoveTransform(existing);

                using (hitObject.BeginAbsoluteSequence(existing.StartTime))
                    hitObject.FadeOut(editor_hit_object_fade_out_extension).Expire();
                break;
            }
        }
        private void updateState(DrawableHitObject hitObject, ArmedState state)
        {
            if (state == ArmedState.Idle)
            {
                return;
            }

            // adjust the visuals of certain object types to make them stay on screen for longer than usual.
            switch (hitObject)
            {
            default:
                // there are quite a few drawable hit types we don't want to extent (spinners, ticks etc.)
                return;

            case DrawableSlider _:
                // no specifics to sliders but let them fade slower below.
                break;

            case DrawableHitCircle circle:     // also handles slider heads
                circle.ApproachCircle
                .FadeOutFromOne(editor_hit_object_fade_out_extension)
                .Expire();
                break;
            }

            // Get the existing fade out transform
            var existing = hitObject.Transforms.LastOrDefault(t => t.TargetMember == nameof(Alpha));

            if (existing == null)
            {
                return;
            }

            hitObject.RemoveTransform(existing);

            using (hitObject.BeginAbsoluteSequence(existing.StartTime))
                hitObject.FadeOut(editor_hit_object_fade_out_extension).Expire();
        }