Merge pull request #20817 from frenzibyte/adjust-spinner-fade-parameters

Adjust spinner fade transitions to match stable
This commit is contained in:
Dean Herbert 2022-10-19 11:58:17 +09:00 committed by GitHub
commit b5a7a112e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 4 deletions

View File

@ -57,7 +57,7 @@ public class DrawableSpinner : DrawableOsuHitObject
/// </summary>
public readonly IBindable<double> SpinsPerMinute = new BindableDouble();
private const double fade_out_duration = 160;
private const double fade_out_duration = 240;
public DrawableSpinner()
: this(null)

View File

@ -107,8 +107,8 @@ protected override void UpdateStateTransforms(DrawableHitObject drawableHitObjec
using (BeginAbsoluteSequence(spinner.StartTime - spinner.TimePreempt))
this.FadeOut();
using (BeginAbsoluteSequence(spinner.StartTime - spinner.TimeFadeIn / 2))
this.FadeInFromZero(spinner.TimeFadeIn / 2);
using (BeginAbsoluteSequence(spinner.StartTime - spinner.TimeFadeIn))
this.FadeInFromZero(spinner.TimeFadeIn);
using (BeginAbsoluteSequence(spinner.StartTime - spinner.TimePreempt))
{

View File

@ -65,6 +65,7 @@ private void load(DrawableHitObject drawableHitObject, ISkinSource source)
{
spin = new Sprite
{
Alpha = 0,
Anchor = Anchor.TopCentre,
Origin = Anchor.Centre,
Texture = source.GetTexture("spinner-spin"),
@ -82,7 +83,7 @@ private void load(DrawableHitObject drawableHitObject, ISkinSource source)
},
bonusCounter = new LegacySpriteText(LegacyFont.Score)
{
Alpha = 0f,
Alpha = 0,
Anchor = Anchor.TopCentre,
Origin = Anchor.Centre,
Scale = new Vector2(SPRITE_SCALE),
@ -179,6 +180,9 @@ protected virtual void UpdateStateTransforms(DrawableHitObject drawableHitObject
spmCounter.MoveToOffset(new Vector2(0, -spm_hide_offset), d.HitObject.TimeFadeIn, Easing.Out);
}
using (BeginAbsoluteSequence(d.HitObject.StartTime - d.HitObject.TimeFadeIn / 2))
spin.FadeInFromZero(d.HitObject.TimeFadeIn / 2);
using (BeginAbsoluteSequence(d.HitObject.StartTime))
ApproachCircle?.ScaleTo(SPRITE_SCALE * 0.1f, d.HitObject.Duration);