1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 15:03:13 +08:00

Make units sane

This commit is contained in:
Dean Herbert 2022-06-10 20:21:03 +09:00
parent 213ccfb743
commit b956a916c1
2 changed files with 10 additions and 5 deletions

View File

@ -10,6 +10,7 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.Events;
using osu.Framework.Input.States;
using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Rulesets.Objects;
@ -84,8 +85,10 @@ namespace osu.Game.Screens.Utility
Vector2 location;
float spacingLow = 0.5f - SampleVisualSpacing.Value;
float spacingHigh = 0.5f + SampleVisualSpacing.Value;
float adjust = SampleVisualSpacing.Value * 0.25f;
float spacingLow = 0.5f - adjust;
float spacingHigh = 0.5f + adjust;
switch (nextLocation % 4)
{
@ -209,7 +212,9 @@ namespace osu.Game.Screens.Utility
{
if (HitEvent == null)
{
approach.Scale = new Vector2(1 + (float)MathHelper.Clamp((HitTime - Clock.CurrentTime) / SampleApproachRate.Value, 0, 100));
double preempt = (float)IBeatmapDifficultyInfo.DifficultyRange(SampleApproachRate.Value, 1800, 1200, 450);
approach.Scale = new Vector2(1 + 4 * (float)MathHelper.Clamp((HitTime - Clock.CurrentTime) / preempt, 0, 100));
Alpha = (float)MathHelper.Clamp((Clock.CurrentTime - HitTime + 600) / 400, 0, 1);
if (Clock.CurrentTime > HitTime + 200)

View File

@ -52,8 +52,8 @@ namespace osu.Game.Screens.Utility
private readonly Container resultsArea;
public readonly BindableDouble SampleBPM = new BindableDouble(120) { MinValue = 60, MaxValue = 300 };
public readonly BindableDouble SampleApproachRate = new BindableDouble(100) { MinValue = 50, MaxValue = 500 };
public readonly BindableFloat SampleVisualSpacing = new BindableFloat(0.2f) { MinValue = 0.05f, MaxValue = 0.3f };
public readonly BindableDouble SampleApproachRate = new BindableDouble(9) { MinValue = 5, MaxValue = 12, Precision = 0.1 };
public readonly BindableFloat SampleVisualSpacing = new BindableFloat(0.5f) { MinValue = 0f, MaxValue = 1, Precision = 0.1f };
/// <summary>
/// The rate at which the game host should attempt to run.