mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 02:32:55 +08:00
Add ability to adjust spacing
This commit is contained in:
parent
e9547542ea
commit
c657ef2722
@ -51,22 +51,27 @@ namespace osu.Game.Screens.Utility
|
|||||||
|
|
||||||
Vector2 location;
|
Vector2 location;
|
||||||
|
|
||||||
|
const float spacing = 0.1f;
|
||||||
|
|
||||||
|
const float spacing_low = 0.5f - spacing;
|
||||||
|
const float spacing_high = 0.5f + spacing;
|
||||||
|
|
||||||
switch (nextLocation % 4)
|
switch (nextLocation % 4)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
location = new Vector2(0.25f, 0.25f);
|
location = new Vector2(spacing_low, spacing_low);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
location = new Vector2(0.75f, 0.75f);
|
location = new Vector2(spacing_high, spacing_high);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
location = new Vector2(0.75f, 0.25f);
|
location = new Vector2(spacing_high, spacing_low);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
location = new Vector2(0.25f, 0.75f);
|
location = new Vector2(spacing_low, spacing_high);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,6 +102,9 @@ namespace osu.Game.Screens.Utility
|
|||||||
|
|
||||||
private const float size = 100;
|
private const float size = 100;
|
||||||
|
|
||||||
|
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos)
|
||||||
|
=> circle.ReceivePositionalInputAt(screenSpacePos);
|
||||||
|
|
||||||
public SampleHitCircle(double hitTime)
|
public SampleHitCircle(double hitTime)
|
||||||
{
|
{
|
||||||
HitTime = hitTime;
|
HitTime = hitTime;
|
||||||
@ -163,7 +171,7 @@ namespace osu.Game.Screens.Utility
|
|||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
|
|
||||||
approach.Scale = new Vector2((float)MathHelper.Clamp((HitTime - Clock.CurrentTime) / 40, 1, 100));
|
approach.Scale = new Vector2((float)MathHelper.Clamp((HitTime - Clock.CurrentTime) / 60, 1, 100));
|
||||||
|
|
||||||
if (Clock.CurrentTime > HitTime + 80)
|
if (Clock.CurrentTime > HitTime + 80)
|
||||||
Expire();
|
Expire();
|
||||||
|
Loading…
Reference in New Issue
Block a user