mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 22:22:54 +08:00
Move constants closer to usages
This commit is contained in:
parent
6eed2c35a4
commit
e91b3ae5f1
@ -18,19 +18,9 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
|
|||||||
{
|
{
|
||||||
public class BarHitErrorMeter : HitErrorMeter
|
public class BarHitErrorMeter : HitErrorMeter
|
||||||
{
|
{
|
||||||
private const int arrow_move_duration = 400;
|
|
||||||
|
|
||||||
private const int judgement_line_width = 10;
|
private const int judgement_line_width = 10;
|
||||||
private const int judgement_line_height = 3;
|
private const int judgement_line_height = 3;
|
||||||
|
|
||||||
private const int centre_marker_size = 6;
|
|
||||||
|
|
||||||
private const int bar_height = 200;
|
|
||||||
|
|
||||||
private const int bar_width = 2;
|
|
||||||
|
|
||||||
private const float chevron_size = 8;
|
|
||||||
|
|
||||||
private SpriteIcon arrow;
|
private SpriteIcon arrow;
|
||||||
private SpriteIcon iconEarly;
|
private SpriteIcon iconEarly;
|
||||||
private SpriteIcon iconLate;
|
private SpriteIcon iconLate;
|
||||||
@ -50,6 +40,12 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
|
const int centre_marker_size = 6;
|
||||||
|
const int bar_height = 200;
|
||||||
|
const int bar_width = 2;
|
||||||
|
const float chevron_size = 8;
|
||||||
|
const float icon_size = 14;
|
||||||
|
|
||||||
var hitWindows = HitWindows.GetAllAvailableWindows().ToArray();
|
var hitWindows = HitWindows.GetAllAvailableWindows().ToArray();
|
||||||
|
|
||||||
InternalChild = new Container
|
InternalChild = new Container
|
||||||
@ -72,7 +68,7 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
|
|||||||
iconEarly = new SpriteIcon
|
iconEarly = new SpriteIcon
|
||||||
{
|
{
|
||||||
Y = -10,
|
Y = -10,
|
||||||
Size = new Vector2(10),
|
Size = new Vector2(icon_size),
|
||||||
Icon = FontAwesome.Solid.ShippingFast,
|
Icon = FontAwesome.Solid.ShippingFast,
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
@ -80,7 +76,7 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
|
|||||||
iconLate = new SpriteIcon
|
iconLate = new SpriteIcon
|
||||||
{
|
{
|
||||||
Y = 10,
|
Y = 10,
|
||||||
Size = new Vector2(10),
|
Size = new Vector2(icon_size),
|
||||||
Icon = FontAwesome.Solid.Bicycle,
|
Icon = FontAwesome.Solid.Bicycle,
|
||||||
Anchor = Anchor.BottomCentre,
|
Anchor = Anchor.BottomCentre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
@ -235,6 +231,8 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
|
|||||||
|
|
||||||
protected override void OnNewJudgement(JudgementResult judgement)
|
protected override void OnNewJudgement(JudgementResult judgement)
|
||||||
{
|
{
|
||||||
|
const int arrow_move_duration = 400;
|
||||||
|
|
||||||
if (!judgement.IsHit || judgement.HitObject.HitWindows?.WindowFor(HitResult.Miss) == 0)
|
if (!judgement.IsHit || judgement.HitObject.HitWindows?.WindowFor(HitResult.Miss) == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user