mirror of
https://github.com/ppy/osu.git
synced 2025-01-21 07:25:05 +08:00
Fix audio beginning to play when potentially paused due to inactive window
Also removes all usage of Delay() in Player. Resolves #793.
This commit is contained in:
parent
9b8d7745c7
commit
bfd37d0350
@ -241,7 +241,7 @@ namespace osu.Game.Screens.Play
|
||||
skipButton.Action = null;
|
||||
};
|
||||
|
||||
skipButton.Delay(firstHitObject - skip_required_cutoff - fade_time);
|
||||
using (skipButton.BeginDelayedSequence(firstHitObject - skip_required_cutoff - fade_time))
|
||||
skipButton.FadeOut(fade_time);
|
||||
skipButton.Expire();
|
||||
}
|
||||
@ -263,7 +263,8 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
ValidForResume = false;
|
||||
|
||||
Delay(1000);
|
||||
using (BeginDelayedSequence(1000))
|
||||
{
|
||||
onCompletionEvent = Schedule(delegate
|
||||
{
|
||||
var score = new Score
|
||||
@ -276,6 +277,7 @@ namespace osu.Game.Screens.Play
|
||||
Push(new Results(score));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void onFail()
|
||||
{
|
||||
@ -299,15 +301,17 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
Content.ScaleTo(0.7f);
|
||||
|
||||
Content.Delay(250);
|
||||
using (Content.BeginDelayedSequence(250))
|
||||
Content.FadeIn(250);
|
||||
|
||||
Content.ScaleTo(1, 750, EasingTypes.OutQuint);
|
||||
|
||||
Delay(750);
|
||||
using (BeginDelayedSequence(750))
|
||||
Schedule(() =>
|
||||
{
|
||||
if (!pauseContainer.IsPaused)
|
||||
decoupledClock.Start();
|
||||
|
||||
initializeSkipButton();
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user