mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Move 'back' sample playback from OnResuming to OnExiting
This commit is contained in:
@ -77,7 +77,7 @@ namespace osu.Game.Screens
|
||||
|
||||
private Sample sampleExit;
|
||||
|
||||
protected virtual bool PlayResumeSound => true;
|
||||
protected virtual bool PlayExitSound => true;
|
||||
|
||||
public virtual float BackgroundParallaxAmount => 1;
|
||||
|
||||
@ -173,9 +173,6 @@ namespace osu.Game.Screens
|
||||
|
||||
public override void OnResuming(ScreenTransitionEvent e)
|
||||
{
|
||||
if (PlayResumeSound)
|
||||
sampleExit?.Play();
|
||||
|
||||
applyArrivingDefaults(true);
|
||||
|
||||
// it's feasible to resume to a screen if the target screen never loaded successfully.
|
||||
@ -215,6 +212,9 @@ namespace osu.Game.Screens
|
||||
|
||||
public override bool OnExiting(ScreenExitEvent e)
|
||||
{
|
||||
if (PlayExitSound)
|
||||
sampleExit?.Play();
|
||||
|
||||
if (ValidForResume && logo != null)
|
||||
onExitingLogo();
|
||||
|
||||
|
Reference in New Issue
Block a user