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