mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 07:42:57 +08:00
Remove most usages of DelayReset
ButtonSystem requires some more work.
This commit is contained in:
parent
12c0a17711
commit
94c259bd59
@ -1 +1 @@
|
|||||||
Subproject commit dcbd7a0b6f536f6aadf13a720db40a1d76bf52e2
|
Subproject commit 07fd653f422bfb7faf382f46b731c18eed24baae
|
@ -148,9 +148,8 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
var completion = (float)userHits / HitObject.RequiredHits;
|
var completion = (float)userHits / HitObject.RequiredHits;
|
||||||
|
|
||||||
expandingRing.FadeTo(expandingRing.Alpha + MathHelper.Clamp(completion / 16, 0.1f, 0.6f), 50);
|
expandingRing.FadeTo(expandingRing.Alpha + MathHelper.Clamp(completion / 16, 0.1f, 0.6f), 50);
|
||||||
expandingRing.Delay(50);
|
using (expandingRing.BeginDelayedSequence(50))
|
||||||
expandingRing.FadeTo(completion / 8, 2000, EasingTypes.OutQuint);
|
expandingRing.FadeTo(completion / 8, 2000, EasingTypes.OutQuint);
|
||||||
expandingRing.DelayReset();
|
|
||||||
|
|
||||||
symbol.RotateTo((float)(completion * HitObject.Duration / 8), 4000, EasingTypes.OutQuint);
|
symbol.RotateTo((float)(completion * HitObject.Duration / 8), 4000, EasingTypes.OutQuint);
|
||||||
|
|
||||||
|
@ -131,14 +131,14 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
foreach (var star in stars.Children)
|
foreach (var star in stars.Children)
|
||||||
{
|
{
|
||||||
star.ClearTransforms(true);
|
star.ClearTransforms(true);
|
||||||
if (count <= newValue)
|
|
||||||
star.Delay(Math.Max(i - count, 0) * animationDelay, true);
|
|
||||||
else
|
|
||||||
star.Delay(Math.Max(count - 1 - i, 0) * animationDelay, true);
|
|
||||||
|
|
||||||
star.FadeTo(i < newValue ? 1.0f : minStarAlpha, fadingDuration);
|
var delay = (count <= newValue ? Math.Max(i - count, 0) : Math.Max(count - 1 - i, 0)) * animationDelay;
|
||||||
star.Icon.ScaleTo(getStarScale(i, newValue), scalingDuration, scalingEasing);
|
|
||||||
star.DelayReset();
|
using (BeginDelayedSequence(delay, true))
|
||||||
|
{
|
||||||
|
star.FadeTo(i < newValue ? 1.0f : minStarAlpha, fadingDuration);
|
||||||
|
star.Icon.ScaleTo(getStarScale(i, newValue), scalingDuration, scalingEasing);
|
||||||
|
}
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
@ -70,24 +70,26 @@ namespace osu.Game.Screens.Ranking
|
|||||||
circleOuterBackground.ScaleTo(1, transition_time, EasingTypes.OutQuint);
|
circleOuterBackground.ScaleTo(1, transition_time, EasingTypes.OutQuint);
|
||||||
circleOuterBackground.FadeTo(1, transition_time, EasingTypes.OutQuint);
|
circleOuterBackground.FadeTo(1, transition_time, EasingTypes.OutQuint);
|
||||||
|
|
||||||
Content.Delay(transition_time * 0.25f, true);
|
using (BeginDelayedSequence(transition_time * 0.25f, true))
|
||||||
|
{
|
||||||
|
|
||||||
circleOuter.ScaleTo(1, transition_time, EasingTypes.OutQuint);
|
circleOuter.ScaleTo(1, transition_time, EasingTypes.OutQuint);
|
||||||
circleOuter.FadeTo(1, transition_time, EasingTypes.OutQuint);
|
circleOuter.FadeTo(1, transition_time, EasingTypes.OutQuint);
|
||||||
|
|
||||||
Content.Delay(transition_time * 0.3f, true);
|
using (BeginDelayedSequence(transition_time * 0.3f, true))
|
||||||
|
{
|
||||||
|
backgroundParallax.FadeIn(transition_time, EasingTypes.OutQuint);
|
||||||
|
|
||||||
backgroundParallax.FadeIn(transition_time, EasingTypes.OutQuint);
|
circleInner.ScaleTo(1, transition_time, EasingTypes.OutQuint);
|
||||||
|
circleInner.FadeTo(1, transition_time, EasingTypes.OutQuint);
|
||||||
|
|
||||||
circleInner.ScaleTo(1, transition_time, EasingTypes.OutQuint);
|
using (BeginDelayedSequence(transition_time * 0.4f, true))
|
||||||
circleInner.FadeTo(1, transition_time, EasingTypes.OutQuint);
|
{
|
||||||
|
modeChangeButtons.FadeIn(transition_time, EasingTypes.OutQuint);
|
||||||
Content.Delay(transition_time * 0.4f, true);
|
currentPage.FadeIn(transition_time, EasingTypes.OutQuint);
|
||||||
|
}
|
||||||
modeChangeButtons.FadeIn(transition_time, EasingTypes.OutQuint);
|
}
|
||||||
currentPage.FadeIn(transition_time, EasingTypes.OutQuint);
|
}
|
||||||
|
|
||||||
Content.DelayReset();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnExiting(Screen next)
|
protected override bool OnExiting(Screen next)
|
||||||
|
@ -106,7 +106,7 @@ namespace osu.Game.Screens.Tournament
|
|||||||
speedTo(0f, 2000);
|
speedTo(0f, 2000);
|
||||||
tracker.FadeIn(200);
|
tracker.FadeIn(200);
|
||||||
|
|
||||||
delayedStateChangeDelegate = Delay(2300).Schedule(() => scrollState = ScrollState.Stopped);
|
delayedStateChangeDelegate = Scheduler.AddDelayed(() => scrollState = ScrollState.Stopped, 2300);
|
||||||
break;
|
break;
|
||||||
case ScrollState.Stopped:
|
case ScrollState.Stopped:
|
||||||
// Find closest to center
|
// Find closest to center
|
||||||
@ -144,7 +144,7 @@ namespace osu.Game.Screens.Tournament
|
|||||||
st.Selected = true;
|
st.Selected = true;
|
||||||
OnSelected?.Invoke(st.Team);
|
OnSelected?.Invoke(st.Team);
|
||||||
|
|
||||||
delayedStateChangeDelegate = Delay(10000).Schedule(() => scrollState = ScrollState.Idle);
|
delayedStateChangeDelegate = Scheduler.AddDelayed(() => scrollState = ScrollState.Idle, 10000);
|
||||||
break;
|
break;
|
||||||
case ScrollState.Idle:
|
case ScrollState.Idle:
|
||||||
resetSelected();
|
resetSelected();
|
||||||
@ -295,11 +295,7 @@ namespace osu.Game.Screens.Tournament
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void speedTo(float value, double duration = 0, EasingTypes easing = EasingTypes.None)
|
private void speedTo(float value, double duration = 0, EasingTypes easing = EasingTypes.None) => TransformTo(() => speed, value, duration, easing, new TransformScrollSpeed());
|
||||||
{
|
|
||||||
DelayReset();
|
|
||||||
TransformTo(() => speed, value, duration, easing, new TransformScrollSpeed());
|
|
||||||
}
|
|
||||||
|
|
||||||
private enum ScrollState
|
private enum ScrollState
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user