From f9fc58c45c01c2547f410e7b1564464c3cb834ca Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 4 Nov 2020 17:30:23 +0900 Subject: [PATCH] Apply same fix to LegacyMainCirclePiece --- .../Skinning/LegacyMainCirclePiece.cs | 44 +++++++++++-------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Skinning/LegacyMainCirclePiece.cs b/osu.Game.Rulesets.Osu/Skinning/LegacyMainCirclePiece.cs index 382d6e53cc..a2ae6f4021 100644 --- a/osu.Game.Rulesets.Osu/Skinning/LegacyMainCirclePiece.cs +++ b/osu.Game.Rulesets.Osu/Skinning/LegacyMainCirclePiece.cs @@ -41,11 +41,14 @@ namespace osu.Game.Rulesets.Osu.Skinning private readonly Bindable accentColour = new Bindable(); private readonly IBindable indexInCurrentCombo = new Bindable(); + [Resolved] + private DrawableHitObject drawableObject { get; set; } + [Resolved] private ISkinSource skin { get; set; } [BackgroundDependencyLoader] - private void load(DrawableHitObject drawableObject) + private void load() { OsuHitObject osuObject = (OsuHitObject)drawableObject.HitObject; @@ -143,28 +146,31 @@ namespace osu.Game.Rulesets.Osu.Skinning { const double legacy_fade_duration = 240; - switch (state.NewValue) + using (BeginAbsoluteSequence(drawableObject.HitStateUpdateTime, true)) { - case ArmedState.Hit: - circleSprites.FadeOut(legacy_fade_duration, Easing.Out); - circleSprites.ScaleTo(1.4f, legacy_fade_duration, Easing.Out); + switch (state.NewValue) + { + case ArmedState.Hit: + circleSprites.FadeOut(legacy_fade_duration, Easing.Out); + circleSprites.ScaleTo(1.4f, legacy_fade_duration, Easing.Out); - if (hasNumber) - { - var legacyVersion = skin.GetConfig(LegacySetting.Version)?.Value; - - if (legacyVersion >= 2.0m) - // legacy skins of version 2.0 and newer only apply very short fade out to the number piece. - hitCircleText.FadeOut(legacy_fade_duration / 4, Easing.Out); - else + if (hasNumber) { - // old skins scale and fade it normally along other pieces. - hitCircleText.FadeOut(legacy_fade_duration, Easing.Out); - hitCircleText.ScaleTo(1.4f, legacy_fade_duration, Easing.Out); - } - } + var legacyVersion = skin.GetConfig(LegacySetting.Version)?.Value; - break; + if (legacyVersion >= 2.0m) + // legacy skins of version 2.0 and newer only apply very short fade out to the number piece. + hitCircleText.FadeOut(legacy_fade_duration / 4, Easing.Out); + else + { + // old skins scale and fade it normally along other pieces. + hitCircleText.FadeOut(legacy_fade_duration, Easing.Out); + hitCircleText.ScaleTo(1.4f, legacy_fade_duration, Easing.Out); + } + } + + break; + } } } }