mirror of
https://github.com/ppy/osu.git
synced 2025-03-04 06:12:57 +08:00
Move 'back' sample playback from OnResuming to OnExiting
This commit is contained in:
parent
af87722be8
commit
6b744a14b0
@ -66,6 +66,8 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
protected override BackgroundScreen CreateBackground() => background;
|
protected override BackgroundScreen CreateBackground() => background;
|
||||||
|
|
||||||
|
protected override bool PlayExitSound => false;
|
||||||
|
|
||||||
private Bindable<double> holdDelay;
|
private Bindable<double> holdDelay;
|
||||||
private Bindable<bool> loginDisplayed;
|
private Bindable<bool> loginDisplayed;
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ namespace osu.Game.Screens
|
|||||||
|
|
||||||
private Sample sampleExit;
|
private Sample sampleExit;
|
||||||
|
|
||||||
protected virtual bool PlayResumeSound => true;
|
protected virtual bool PlayExitSound => true;
|
||||||
|
|
||||||
public virtual float BackgroundParallaxAmount => 1;
|
public virtual float BackgroundParallaxAmount => 1;
|
||||||
|
|
||||||
@ -173,9 +173,6 @@ namespace osu.Game.Screens
|
|||||||
|
|
||||||
public override void OnResuming(ScreenTransitionEvent e)
|
public override void OnResuming(ScreenTransitionEvent e)
|
||||||
{
|
{
|
||||||
if (PlayResumeSound)
|
|
||||||
sampleExit?.Play();
|
|
||||||
|
|
||||||
applyArrivingDefaults(true);
|
applyArrivingDefaults(true);
|
||||||
|
|
||||||
// it's feasible to resume to a screen if the target screen never loaded successfully.
|
// 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)
|
public override bool OnExiting(ScreenExitEvent e)
|
||||||
{
|
{
|
||||||
|
if (PlayExitSound)
|
||||||
|
sampleExit?.Play();
|
||||||
|
|
||||||
if (ValidForResume && logo != null)
|
if (ValidForResume && logo != null)
|
||||||
onExitingLogo();
|
onExitingLogo();
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ namespace osu.Game.Screens.Play
|
|||||||
// We show the previous screen status
|
// We show the previous screen status
|
||||||
protected override UserActivity? InitialActivity => null;
|
protected override UserActivity? InitialActivity => null;
|
||||||
|
|
||||||
protected override bool PlayResumeSound => false;
|
protected override bool PlayExitSound => false;
|
||||||
|
|
||||||
protected BeatmapMetadataDisplay MetadataInfo { get; private set; } = null!;
|
protected BeatmapMetadataDisplay MetadataInfo { get; private set; } = null!;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user