1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-13 22:07:25 +08:00

Improve light rotational alignment and increase light count to 8

This commit is contained in:
Dean Herbert 2022-06-02 16:58:14 +09:00
parent 060372a129
commit 4abfb35611

View File

@ -62,7 +62,7 @@ namespace osu.Game.Screens.Edit.Timing
private ScheduledDelegate? resetDelegate; private ScheduledDelegate? resetDelegate;
private const int light_count = 6; private const int light_count = 8;
private const int initial_taps_to_ignore = 4; private const int initial_taps_to_ignore = 4;
@ -70,6 +70,8 @@ namespace osu.Game.Screens.Edit.Timing
private const double transition_length = 500; private const double transition_length = 500;
private const float angular_light_gap = 0.007f;
private readonly List<double> tapTimings = new List<double>(); private readonly List<double> tapTimings = new List<double>();
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
@ -185,7 +187,7 @@ namespace osu.Game.Screens.Edit.Timing
{ {
var light = new Light var light = new Light
{ {
Rotation = i * (360f / light_count) Rotation = (i + 1) * (360f / light_count) + 360 * angular_light_gap / 2,
}; };
lights.Add(light); lights.Add(light);
@ -336,6 +338,7 @@ namespace osu.Game.Screens.Edit.Timing
light.Hide(); light.Hide();
tapTimings.Clear(); tapTimings.Clear();
currentLight = 0;
IsHandlingTapping.Value = false; IsHandlingTapping.Value = false;
} }
@ -357,14 +360,12 @@ namespace osu.Game.Screens.Edit.Timing
Size = new Vector2(0.98f); // Avoid bleed into masking edge. Size = new Vector2(0.98f); // Avoid bleed into masking edge.
const float angular_gap = 0.007f;
InternalChildren = new Drawable[] InternalChildren = new Drawable[]
{ {
new CircularProgress new CircularProgress
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Current = { Value = 1f / light_count - angular_gap }, Current = { Value = 1f / light_count - angular_light_gap },
Colour = colourProvider.Background2, Colour = colourProvider.Background2,
}, },
fillContent = new Container fillContent = new Container
@ -377,7 +378,7 @@ namespace osu.Game.Screens.Edit.Timing
new CircularProgress new CircularProgress
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Current = { Value = 1f / light_count - angular_gap }, Current = { Value = 1f / light_count - angular_light_gap },
Blending = BlendingParameters.Additive Blending = BlendingParameters.Additive
}, },
// Please do not try and make sense of this. // Please do not try and make sense of this.