mirror of
https://github.com/ppy/osu
synced 2024-12-15 11:25:29 +00:00
SImplify everything
This commit is contained in:
parent
0ae00cbd17
commit
dd2ae3f701
@ -60,8 +60,6 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
|
||||
d.FadeIn = fadeInDuration;
|
||||
|
||||
using (drawable.BeginAbsoluteSequence(fadeInStartTime, true))
|
||||
{
|
||||
switch (drawable)
|
||||
{
|
||||
case DrawableHitCircle circle:
|
||||
@ -70,7 +68,10 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
|
||||
// prolong the hitcircle long enough so misses are still possible
|
||||
circle.LifetimeEnd = circle.HitObject.StartTime + Math.Max(fadeOutDuration, circle.HitObject.HitWindowFor(HitResult.Miss));
|
||||
circle.FadeIn(fadeInDuration).Then().FadeOut(fadeOutDuration); // override fade in as it somehow gets cut otherwise
|
||||
|
||||
// fade out immediately after fade in.
|
||||
using (drawable.BeginAbsoluteSequence(fadeInStartTime + fadeInDuration, true))
|
||||
circle.FadeOut(fadeOutDuration);
|
||||
break;
|
||||
case DrawableSlider slider:
|
||||
using (slider.BeginAbsoluteSequence(fadeOutStartTime, true))
|
||||
@ -84,34 +85,36 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
slider.Delay(fadeOutDuration).Expire();
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
case DrawableSpinner spinner:
|
||||
spinner.Disc.FadeOut();
|
||||
spinner.Ticks.FadeOut();
|
||||
spinner.Background.FadeOut();
|
||||
// hide elements we don't care about.
|
||||
spinner.Disc.Hide();
|
||||
spinner.Ticks.Hide();
|
||||
spinner.Background.Hide();
|
||||
|
||||
using (spinner.BeginAbsoluteSequence(fadeOutStartTime, true))
|
||||
using (spinner.BeginAbsoluteSequence(fadeOutStartTime + longFadeDuration, true))
|
||||
{
|
||||
var sequence = spinner.Delay(longFadeDuration).FadeOut(fadeOutDuration);
|
||||
spinner.FadeOut(fadeOutDuration);
|
||||
|
||||
// speed up the end sequence accordingly
|
||||
switch (state)
|
||||
{
|
||||
case ArmedState.Hit:
|
||||
sequence.ScaleTo(spinner.Scale * 1.2f, fadeOutDuration * 2, Easing.Out);
|
||||
spinner.ScaleTo(spinner.Scale * 1.2f, fadeOutDuration * 2, Easing.Out);
|
||||
break;
|
||||
case ArmedState.Miss:
|
||||
sequence.ScaleTo(spinner.Scale * 0.8f, fadeOutDuration * 2, Easing.Out);
|
||||
spinner.ScaleTo(spinner.Scale * 0.8f, fadeOutDuration * 2, Easing.Out);
|
||||
break;
|
||||
}
|
||||
|
||||
sequence.Expire();
|
||||
spinner.Expire();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class OsuModHardRock : ModHardRock, IApplicableToHitObject<OsuHitObject>
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user