mirror of
https://github.com/ppy/osu
synced 2025-01-21 13:23:13 +00:00
rename trackable to enabled and cleanup code
This commit is contained in:
parent
c9520b299a
commit
d314b38699
@ -33,7 +33,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
{
|
||||
if (hitObject is DrawableSpinner spinner)
|
||||
{
|
||||
spinner.Disc.Trackable = false;
|
||||
spinner.Disc.Enabled = false;
|
||||
spinner.Disc.OnUpdate += d =>
|
||||
{
|
||||
var s = d as SpinnerDisc;
|
||||
|
@ -177,7 +177,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
protected override void Update()
|
||||
{
|
||||
Disc.Tracking = OsuActionInputManager?.PressedActions.Any(x => x == OsuAction.LeftButton || x == OsuAction.RightButton) ?? false;
|
||||
if (!SpmCounter.IsPresent && (Disc.Tracking || !Disc.Trackable))
|
||||
if (!SpmCounter.IsPresent && Disc.Tracking)
|
||||
SpmCounter.FadeIn(HitObject.TimeFadeIn);
|
||||
|
||||
base.Update();
|
||||
|
@ -50,9 +50,9 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
get => tracking;
|
||||
set
|
||||
{
|
||||
if (value == tracking) return;
|
||||
if ((Enabled && value) == tracking) return;
|
||||
|
||||
tracking = value;
|
||||
tracking = Enabled && value;
|
||||
|
||||
background.FadeTo(tracking ? tracking_alpha : idle_alpha, 100);
|
||||
}
|
||||
@ -74,7 +74,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
}
|
||||
|
||||
public bool Valid => spinner.StartTime <= Time.Current && spinner.EndTime > Time.Current;
|
||||
public bool Trackable { get; set; } = true;
|
||||
|
||||
public bool Enabled { get; set; } = true;
|
||||
|
||||
protected override bool OnMouseMove(MouseMoveEvent e)
|
||||
{
|
||||
@ -100,7 +101,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
|
||||
var delta = thisAngle - lastAngle;
|
||||
|
||||
if (Valid && tracking && Trackable)
|
||||
if (Valid && tracking)
|
||||
Rotate(delta);
|
||||
|
||||
lastAngle = thisAngle;
|
||||
|
Loading…
Reference in New Issue
Block a user