1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 14:17:26 +08:00

Apply same fix to LegacyMainCirclePiece

This commit is contained in:
Dean Herbert 2020-11-04 17:30:23 +09:00
parent 65fb8628e0
commit f9fc58c45c

View File

@ -41,11 +41,14 @@ namespace osu.Game.Rulesets.Osu.Skinning
private readonly Bindable<Color4> accentColour = new Bindable<Color4>(); private readonly Bindable<Color4> accentColour = new Bindable<Color4>();
private readonly IBindable<int> indexInCurrentCombo = new Bindable<int>(); private readonly IBindable<int> indexInCurrentCombo = new Bindable<int>();
[Resolved]
private DrawableHitObject drawableObject { get; set; }
[Resolved] [Resolved]
private ISkinSource skin { get; set; } private ISkinSource skin { get; set; }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(DrawableHitObject drawableObject) private void load()
{ {
OsuHitObject osuObject = (OsuHitObject)drawableObject.HitObject; OsuHitObject osuObject = (OsuHitObject)drawableObject.HitObject;
@ -143,28 +146,31 @@ namespace osu.Game.Rulesets.Osu.Skinning
{ {
const double legacy_fade_duration = 240; const double legacy_fade_duration = 240;
switch (state.NewValue) using (BeginAbsoluteSequence(drawableObject.HitStateUpdateTime, true))
{ {
case ArmedState.Hit: switch (state.NewValue)
circleSprites.FadeOut(legacy_fade_duration, Easing.Out); {
circleSprites.ScaleTo(1.4f, legacy_fade_duration, Easing.Out); case ArmedState.Hit:
circleSprites.FadeOut(legacy_fade_duration, Easing.Out);
circleSprites.ScaleTo(1.4f, legacy_fade_duration, Easing.Out);
if (hasNumber) if (hasNumber)
{
var legacyVersion = skin.GetConfig<LegacySetting, decimal>(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
{ {
// old skins scale and fade it normally along other pieces. var legacyVersion = skin.GetConfig<LegacySetting, decimal>(LegacySetting.Version)?.Value;
hitCircleText.FadeOut(legacy_fade_duration, Easing.Out);
hitCircleText.ScaleTo(1.4f, legacy_fade_duration, Easing.Out);
}
}
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;
}
} }
} }
} }