Make variables private

This commit is contained in:
TheWildTree
2020-02-02 14:34:06 +01:00
parent f7abfdb40e
commit 35032e2ddd

View File

@ -1,4 +1,4 @@
// 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; using System;
@ -23,8 +23,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
public Func<OsuAction?> GetInitialHitAction; public Func<OsuAction?> GetInitialHitAction;
private readonly Slider slider; private readonly Slider slider;
public readonly Drawable FollowCircle; private readonly Drawable followCircle;
public readonly Drawable TrackingArea; private readonly Drawable trackingArea;
private readonly DrawableSlider drawableSlider; private readonly DrawableSlider drawableSlider;
public SliderBall(Slider slider, DrawableSlider drawableSlider = null) public SliderBall(Slider slider, DrawableSlider drawableSlider = null)
@ -40,13 +40,13 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
Children = new[] Children = new[]
{ {
// This is separate from the visible followcircle to ensure consistent internal tracking area (needed to match osu-stable) // This is separate from the visible followcircle to ensure consistent internal tracking area (needed to match osu-stable)
TrackingArea = new CircularContainer trackingArea = new CircularContainer
{ {
Origin = Anchor.Centre, Origin = Anchor.Centre,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
RelativeSizeAxes = Axes.Both RelativeSizeAxes = Axes.Both
}, },
FollowCircle = new FollowCircleContainer followCircle = new FollowCircleContainer
{ {
Origin = Anchor.Centre, Origin = Anchor.Centre,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
@ -104,9 +104,9 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
tracking = value; tracking = value;
// Tracking area is bigger than the visible followcircle and scales instantly to match osu-stable // Tracking area is bigger than the visible followcircle and scales instantly to match osu-stable
TrackingArea.ScaleTo(tracking ? 2.4f : 1f); trackingArea.ScaleTo(tracking ? 2.4f : 1f);
FollowCircle.ScaleTo(tracking ? 2f : 1f, 300, Easing.OutQuint); followCircle.ScaleTo(tracking ? 2f : 1f, 300, Easing.OutQuint);
FollowCircle.FadeTo(tracking ? 1f : 0, 300, Easing.OutQuint); followCircle.FadeTo(tracking ? 1f : 0, 300, Easing.OutQuint);
} }
} }
@ -159,7 +159,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
// in valid time range // in valid time range
Time.Current >= slider.StartTime && Time.Current < slider.EndTime && Time.Current >= slider.StartTime && Time.Current < slider.EndTime &&
// in valid position range // in valid position range
lastScreenSpaceMousePosition.HasValue && TrackingArea.ReceivePositionalInputAt(lastScreenSpaceMousePosition.Value) && lastScreenSpaceMousePosition.HasValue && trackingArea.ReceivePositionalInputAt(lastScreenSpaceMousePosition.Value) &&
// valid action // valid action
(actions?.Any(isValidTrackingAction) ?? false); (actions?.Any(isValidTrackingAction) ?? false);
} }