mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Enforce readonly private members where possible.
This commit is contained in:
@ -11,7 +11,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
||||
{
|
||||
public class ApproachCircle : Container
|
||||
{
|
||||
private Sprite approachCircle;
|
||||
private readonly Sprite approachCircle;
|
||||
|
||||
public ApproachCircle()
|
||||
{
|
||||
|
@ -14,7 +14,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
||||
{
|
||||
public class CirclePiece : Container
|
||||
{
|
||||
private Sprite disc;
|
||||
private readonly Sprite disc;
|
||||
|
||||
|
||||
public Func<bool> Hit;
|
||||
|
@ -11,7 +11,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
||||
{
|
||||
public class GlowPiece : Container
|
||||
{
|
||||
private Sprite layer;
|
||||
private readonly Sprite layer;
|
||||
|
||||
public GlowPiece()
|
||||
{
|
||||
|
@ -12,7 +12,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
||||
{
|
||||
public class NumberPiece : Container
|
||||
{
|
||||
private SpriteText number;
|
||||
private readonly SpriteText number;
|
||||
|
||||
public string Text
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
||||
public class SliderBall : CircularContainer, ISliderProgress
|
||||
{
|
||||
private readonly Slider slider;
|
||||
private Box follow;
|
||||
private readonly Box follow;
|
||||
|
||||
private const float width = 128;
|
||||
|
||||
|
@ -18,8 +18,8 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
||||
{
|
||||
public class SliderBody : Container, ISliderProgress
|
||||
{
|
||||
private Path path;
|
||||
private BufferedContainer container;
|
||||
private readonly Path path;
|
||||
private readonly BufferedContainer container;
|
||||
|
||||
public float PathWidth
|
||||
{
|
||||
@ -33,7 +33,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
||||
public double? SnakedStart { get; private set; }
|
||||
public double? SnakedEnd { get; private set; }
|
||||
|
||||
private Slider slider;
|
||||
private readonly Slider slider;
|
||||
public SliderBody(Slider s)
|
||||
{
|
||||
slider = s;
|
||||
@ -122,7 +122,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
||||
path.Texture = texture;
|
||||
}
|
||||
|
||||
private List<Vector2> currentCurve = new List<Vector2>();
|
||||
private readonly List<Vector2> currentCurve = new List<Vector2>();
|
||||
private bool updateSnaking(double p0, double p1)
|
||||
{
|
||||
if (SnakedStart == p0 && SnakedEnd == p1) return false;
|
||||
|
@ -11,7 +11,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
||||
{
|
||||
private readonly Slider slider;
|
||||
private readonly bool isEnd;
|
||||
private TextAwesome icon;
|
||||
private readonly TextAwesome icon;
|
||||
|
||||
public SliderBouncer(Slider slider, bool isEnd)
|
||||
{
|
||||
|
Reference in New Issue
Block a user