Enforce readonly private members where possible.

This commit is contained in:
Dean Herbert
2017-03-23 13:41:50 +09:00
parent 5138890530
commit 54e1b24fe9
115 changed files with 278 additions and 259 deletions

View File

@ -106,7 +106,7 @@ namespace osu.Game.Screens.Play
public class Receptor : Drawable
{
private KeyCounterCollection target;
private readonly KeyCounterCollection target;
public Receptor(KeyCounterCollection target)
{

View File

@ -13,10 +13,10 @@ namespace osu.Game.Screens.Play.Pause
{
public class PauseProgressBar : Container
{
private Color4 fillColour = new Color4(221, 255, 255, 255);
private Color4 glowColour = new Color4(221, 255, 255, 150);
private readonly Color4 fillColour = new Color4(221, 255, 255, 255);
private readonly Color4 glowColour = new Color4(221, 255, 255, 150);
private Container fill;
private readonly Container fill;
private WorkingBeatmap current;
[BackgroundDependencyLoader]

View File

@ -42,7 +42,7 @@ namespace osu.Game.Screens.Play
public int RestartCount;
private double pauseCooldown = 1000;
private readonly double pauseCooldown = 1000;
private double lastPauseActionTime;
private bool canPause => Time.Current >= lastPauseActionTime + pauseCooldown;

View File

@ -9,7 +9,7 @@ namespace osu.Game.Screens.Play
{
public class PlayerInputManager : PassThroughInputManager
{
private ManualClock clock = new ManualClock();
private readonly ManualClock clock = new ManualClock();
private IFrameBasedClock parentClock;
private ReplayInputHandler replayInputHandler;

View File

@ -21,7 +21,7 @@ namespace osu.Game.Screens.Play
public class PlayerLoader : OsuScreen
{
private readonly Player player;
private OsuLogo logo;
private readonly OsuLogo logo;
private BeatmapMetadataDisplay info;
protected override BackgroundScreen CreateBackground() => new BackgroundScreenBeatmap(Beatmap);