mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 05:33:07 +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,8 +241,8 @@ namespace osu.Game.Screens.Play
|
|||||||
skipButton.Action = null;
|
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.FadeOut(fade_time);
|
||||||
skipButton.Expire();
|
skipButton.Expire();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -263,18 +263,20 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
ValidForResume = false;
|
ValidForResume = false;
|
||||||
|
|
||||||
Delay(1000);
|
using (BeginDelayedSequence(1000))
|
||||||
onCompletionEvent = Schedule(delegate
|
|
||||||
{
|
{
|
||||||
var score = new Score
|
onCompletionEvent = Schedule(delegate
|
||||||
{
|
{
|
||||||
Beatmap = Beatmap.BeatmapInfo,
|
var score = new Score
|
||||||
Ruleset = ruleset
|
{
|
||||||
};
|
Beatmap = Beatmap.BeatmapInfo,
|
||||||
scoreProcessor.PopulateScore(score);
|
Ruleset = ruleset
|
||||||
score.User = HitRenderer.Replay?.User ?? (Game as OsuGame)?.API?.LocalUser?.Value;
|
};
|
||||||
Push(new Results(score));
|
scoreProcessor.PopulateScore(score);
|
||||||
});
|
score.User = HitRenderer.Replay?.User ?? (Game as OsuGame)?.API?.LocalUser?.Value;
|
||||||
|
Push(new Results(score));
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onFail()
|
private void onFail()
|
||||||
@ -299,17 +301,19 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
Content.ScaleTo(0.7f);
|
Content.ScaleTo(0.7f);
|
||||||
|
|
||||||
Content.Delay(250);
|
using (Content.BeginDelayedSequence(250))
|
||||||
Content.FadeIn(250);
|
Content.FadeIn(250);
|
||||||
|
|
||||||
Content.ScaleTo(1, 750, EasingTypes.OutQuint);
|
Content.ScaleTo(1, 750, EasingTypes.OutQuint);
|
||||||
|
|
||||||
Delay(750);
|
using (BeginDelayedSequence(750))
|
||||||
Schedule(() =>
|
Schedule(() =>
|
||||||
{
|
{
|
||||||
decoupledClock.Start();
|
if (!pauseContainer.IsPaused)
|
||||||
initializeSkipButton();
|
decoupledClock.Start();
|
||||||
});
|
|
||||||
|
initializeSkipButton();
|
||||||
|
});
|
||||||
|
|
||||||
pauseContainer.Alpha = 0;
|
pauseContainer.Alpha = 0;
|
||||||
pauseContainer.FadeIn(750, EasingTypes.OutQuint);
|
pauseContainer.FadeIn(750, EasingTypes.OutQuint);
|
||||||
|
Loading…
Reference in New Issue
Block a user