improve code quality using resharper and codefactor advice

This commit is contained in:
Albie
2019-11-24 07:42:39 +00:00
parent 8294b9ebe7
commit 1d6665fe57
4 changed files with 3 additions and 7 deletions

View File

@ -1,10 +1,7 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using System.Linq;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Game.Beatmaps;
using osu.Game.Configuration;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Rulesets.Objects; using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.UI; using osu.Game.Rulesets.UI;

View File

@ -33,7 +33,7 @@ namespace osu.Game.Screens.Play
base.LoadComplete(); base.LoadComplete();
} }
protected override bool ShowDimContent => IgnoreUserSettings.Value || ShowStoryboard.Value && DimLevel < 1; protected override bool ShowDimContent => IgnoreUserSettings.Value || (ShowStoryboard.Value && DimLevel < 1);
private void initializeStoryboard(bool async) private void initializeStoryboard(bool async)
{ {

View File

@ -2,7 +2,6 @@
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
@ -34,7 +33,7 @@ namespace osu.Game.Screens.Play
base.LoadComplete(); base.LoadComplete();
} }
protected override bool ShowDimContent => IgnoreUserSettings.Value || ShowVideo.Value && DimLevel < 1; protected override bool ShowDimContent => IgnoreUserSettings.Value || (ShowVideo.Value && DimLevel < 1);
private void initializeVideo(bool async) private void initializeVideo(bool async)
{ {

View File

@ -432,7 +432,7 @@ namespace osu.Game.Screens.Play
// cannot pause if we are already in a fail state // cannot pause if we are already in a fail state
&& !HasFailed && !HasFailed
// cannot pause if already paused (or in a cooldown state) unless we are in a resuming state. // cannot pause if already paused (or in a cooldown state) unless we are in a resuming state.
&& (IsResuming || (GameplayClockContainer.IsPaused.Value == false && !pauseCooldownActive)); && (IsResuming || GameplayClockContainer.IsPaused.Value == false && !pauseCooldownActive);
private bool pauseCooldownActive => private bool pauseCooldownActive =>
lastPauseActionTime.HasValue && GameplayClockContainer.GameplayClock.CurrentTime < lastPauseActionTime + pause_cooldown; lastPauseActionTime.HasValue && GameplayClockContainer.GameplayClock.CurrentTime < lastPauseActionTime + pause_cooldown;