mirror of
https://github.com/ppy/osu
synced 2025-02-20 04:17:06 +00:00
Make states better defined
This commit is contained in:
parent
ad3007eaad
commit
3d54f4a5ab
@ -6,12 +6,12 @@ namespace osu.Game.Screens.Play
|
||||
public enum LocalUserPlayingStates
|
||||
{
|
||||
/// <summary>
|
||||
/// The local player is not current in gameplay.
|
||||
/// The local player is not current in gameplay. If watching a replay, gameplay always remains in this state.
|
||||
/// </summary>
|
||||
NotPlaying,
|
||||
|
||||
/// <summary>
|
||||
/// The local player is in a break, paused, or failed or passed but still at the gameplay screen.
|
||||
/// The local player is in a break, paused, or failed but still at the gameplay screen.
|
||||
/// </summary>
|
||||
Break,
|
||||
|
||||
|
@ -508,16 +508,16 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
private void updateGameplayState()
|
||||
{
|
||||
bool inGameplay = !DrawableRuleset.HasReplayLoaded.Value && !GameplayState.HasFailed;
|
||||
bool inBreak = breakTracker.IsBreakTime.Value || DrawableRuleset.IsPaused.Value;
|
||||
bool inGameplay = !DrawableRuleset.HasReplayLoaded.Value;
|
||||
bool inBreak = breakTracker.IsBreakTime.Value || DrawableRuleset.IsPaused.Value || GameplayState.HasFailed;
|
||||
|
||||
if (inGameplay)
|
||||
playingState.Value = inBreak ? LocalUserPlayingStates.Break : LocalUserPlayingStates.Playing;
|
||||
else
|
||||
playingState.Value = LocalUserPlayingStates.NotPlaying;
|
||||
|
||||
localUserPlaying.Value = playingState.Value != LocalUserPlayingStates.NotPlaying;
|
||||
OverlayActivationMode.Value = playingState.Value != LocalUserPlayingStates.NotPlaying ? OverlayActivation.Disabled : OverlayActivation.UserTriggered;
|
||||
localUserPlaying.Value = playingState.Value == LocalUserPlayingStates.Playing;
|
||||
OverlayActivationMode.Value = playingState.Value == LocalUserPlayingStates.Playing ? OverlayActivation.Disabled : OverlayActivation.UserTriggered;
|
||||
}
|
||||
|
||||
private void updateSampleDisabledState()
|
||||
|
Loading…
Reference in New Issue
Block a user