mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 10:33:01 +08:00
fade slider ticks with hidden mod
This commit is contained in:
parent
0ba76bbaa1
commit
c3ce015869
@ -1,6 +1,7 @@
|
||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Framework.Graphics;
|
||||
@ -47,16 +48,20 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
|
||||
// fade out immediately after fade in.
|
||||
using (drawable.BeginAbsoluteSequence(fadeOutStartTime, true))
|
||||
{
|
||||
circle.FadeOut(fadeOutDuration);
|
||||
}
|
||||
|
||||
break;
|
||||
case DrawableSlider slider:
|
||||
using (slider.BeginAbsoluteSequence(fadeOutStartTime, true))
|
||||
{
|
||||
slider.Body.FadeOut(longFadeDuration, Easing.Out);
|
||||
}
|
||||
|
||||
break;
|
||||
case DrawableSliderTick sliderTick:
|
||||
// slider ticks fade out over up to one second
|
||||
var tickFadeOutDuration = Math.Min(sliderTick.HitObject.TimePreempt - DrawableSliderTick.ANIM_DURATION, 1000);
|
||||
|
||||
using (sliderTick.BeginAbsoluteSequence(sliderTick.HitObject.StartTime - tickFadeOutDuration, true))
|
||||
sliderTick.FadeOut(tickFadeOutDuration);
|
||||
|
||||
break;
|
||||
case DrawableSpinner spinner:
|
||||
@ -66,9 +71,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
spinner.Background.Hide();
|
||||
|
||||
using (spinner.BeginAbsoluteSequence(fadeOutStartTime + longFadeDuration, true))
|
||||
{
|
||||
spinner.FadeOut(fadeOutDuration);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
{
|
||||
public class DrawableSliderTick : DrawableOsuHitObject, IRequireTracking
|
||||
{
|
||||
private const double anim_duration = 150;
|
||||
public const double ANIM_DURATION = 150;
|
||||
|
||||
public bool Tracking { get; set; }
|
||||
|
||||
@ -51,8 +51,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
protected override void UpdatePreemptState()
|
||||
{
|
||||
this.Animate(
|
||||
d => d.FadeIn(anim_duration),
|
||||
d => d.ScaleTo(0.5f).ScaleTo(1f, anim_duration * 4, Easing.OutElasticHalf)
|
||||
d => d.FadeIn(ANIM_DURATION),
|
||||
d => d.ScaleTo(0.5f).ScaleTo(1f, ANIM_DURATION * 4, Easing.OutElasticHalf)
|
||||
);
|
||||
}
|
||||
|
||||
@ -64,12 +64,12 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
this.Delay(HitObject.TimePreempt).FadeOut();
|
||||
break;
|
||||
case ArmedState.Miss:
|
||||
this.FadeOut(anim_duration)
|
||||
.FadeColour(Color4.Red, anim_duration / 2);
|
||||
this.FadeOut(ANIM_DURATION)
|
||||
.FadeColour(Color4.Red, ANIM_DURATION / 2);
|
||||
break;
|
||||
case ArmedState.Hit:
|
||||
this.FadeOut(anim_duration, Easing.OutQuint)
|
||||
.ScaleTo(Scale * 1.5f, anim_duration, Easing.Out);
|
||||
this.FadeOut(ANIM_DURATION, Easing.OutQuint)
|
||||
.ScaleTo(Scale * 1.5f, ANIM_DURATION, Easing.Out);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user