mirror of
https://github.com/ppy/osu
synced 2025-02-07 13:51:59 +00:00
Rename some variables
This commit is contained in:
parent
9f62d1d98c
commit
670fcea68d
@ -42,7 +42,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
private IBindable<bool> isBreakTime;
|
private IBindable<bool> isBreakTime;
|
||||||
private PeriodTracker spinnerPeriods;
|
private PeriodTracker spinnerPeriods;
|
||||||
|
|
||||||
private float targetAlpha;
|
private float comboBasedAlpha;
|
||||||
|
|
||||||
[SettingSource(
|
[SettingSource(
|
||||||
"Hidden at combo",
|
"Hidden at combo",
|
||||||
@ -76,15 +76,15 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
currentCombo = scoreProcessor.Combo.GetBoundCopy();
|
currentCombo = scoreProcessor.Combo.GetBoundCopy();
|
||||||
currentCombo.BindValueChanged(combo =>
|
currentCombo.BindValueChanged(combo =>
|
||||||
{
|
{
|
||||||
targetAlpha = Math.Max(min_alpha, 1 - (float)combo.NewValue / HiddenComboCount.Value);
|
comboBasedAlpha = Math.Max(min_alpha, 1 - (float)combo.NewValue / HiddenComboCount.Value);
|
||||||
}, true);
|
}, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void Update(Playfield playfield)
|
public virtual void Update(Playfield playfield)
|
||||||
{
|
{
|
||||||
var overrideAlpha = isBreakTime.Value || spinnerPeriods.IsInAny(playfield.Clock.CurrentTime);
|
var shouldAlwaysShowCursor = isBreakTime.Value || spinnerPeriods.IsInAny(playfield.Clock.CurrentTime);
|
||||||
var targetOverriddenAlpha = overrideAlpha ? 1 : targetAlpha;
|
var targetAlpha = shouldAlwaysShowCursor ? 1 : comboBasedAlpha;
|
||||||
playfield.Cursor.Alpha = (float)Interpolation.Lerp(playfield.Cursor.Alpha, targetOverriddenAlpha, Math.Clamp(playfield.Time.Elapsed / transition_duration, 0, 1));
|
playfield.Cursor.Alpha = (float)Interpolation.Lerp(playfield.Cursor.Alpha, targetAlpha, Math.Clamp(playfield.Time.Elapsed / transition_duration, 0, 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user