mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 22:06:08 +08:00
Apply suggested changes
This commit is contained in:
parent
6c60db550f
commit
dd6351b8ca
@ -27,6 +27,9 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
private const int bar_width = 3;
|
private const int bar_width = 3;
|
||||||
private const int judgement_line_width = 8;
|
private const int judgement_line_width = 8;
|
||||||
private const int bar_height = 200;
|
private const int bar_height = 200;
|
||||||
|
private const int fade_duration = 200;
|
||||||
|
private const int arrow_move_duration = 500;
|
||||||
|
private const int judgement_life_time = 10000;
|
||||||
private const int spacing = 3;
|
private const int spacing = 3;
|
||||||
|
|
||||||
public HitWindows HitWindows { get; set; }
|
public HitWindows HitWindows { get; set; }
|
||||||
@ -152,11 +155,11 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
switch (type.NewValue)
|
switch (type.NewValue)
|
||||||
{
|
{
|
||||||
case ScoreMeterType.None:
|
case ScoreMeterType.None:
|
||||||
this.FadeOut(200, Easing.OutQuint);
|
this.FadeOut(fade_duration, Easing.OutQuint);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ScoreMeterType.HitError:
|
case ScoreMeterType.HitError:
|
||||||
this.FadeIn(200, Easing.OutQuint);
|
this.FadeIn(fade_duration, Easing.OutQuint);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -166,14 +169,13 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
if (!newJudgement.IsHit)
|
if (!newJudgement.IsHit)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Container judgementLine;
|
var judgementLine = CreateJudgementLine(newJudgement);
|
||||||
|
|
||||||
judgementsContainer.Add(judgementLine = CreateJudgementLine(newJudgement));
|
judgementsContainer.Add(judgementLine);
|
||||||
|
|
||||||
judgementLine.FadeOut(10000, Easing.OutQuint);
|
judgementLine.FadeOut(judgement_life_time, Easing.OutQuint).Expire();
|
||||||
judgementLine.Expire();
|
|
||||||
|
|
||||||
arrow.MoveToY(calculateArrowPosition(newJudgement), 500, Easing.OutQuint);
|
arrow.MoveToY(calculateArrowPosition(newJudgement), arrow_move_duration, Easing.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual Container CreateJudgementLine(JudgementResult judgement) => new CircularContainer
|
protected virtual Container CreateJudgementLine(JudgementResult judgement) => new CircularContainer
|
||||||
|
@ -5,6 +5,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
|
using osu.Framework.Extensions.IEnumerableExtensions;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
@ -276,17 +277,16 @@ namespace osu.Game.Screens.Play
|
|||||||
ComboCounter?.Current.BindTo(processor.Combo);
|
ComboCounter?.Current.BindTo(processor.Combo);
|
||||||
HealthDisplay?.Current.BindTo(processor.Health);
|
HealthDisplay?.Current.BindTo(processor.Health);
|
||||||
|
|
||||||
if (LeftHitErrorDisplay != null)
|
var hitWindows = processor.CreateHitWindows();
|
||||||
{
|
|
||||||
processor.NewJudgement += LeftHitErrorDisplay.OnNewJudgement;
|
|
||||||
LeftHitErrorDisplay.HitWindows = processor.CreateHitWindows();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (RightHitErrorDisplay != null)
|
visibilityContainer.ForEach(drawable =>
|
||||||
{
|
{
|
||||||
processor.NewJudgement += RightHitErrorDisplay.OnNewJudgement;
|
if (drawable is HitErrorDisplay)
|
||||||
RightHitErrorDisplay.HitWindows = processor.CreateHitWindows();
|
{
|
||||||
}
|
processor.NewJudgement += (drawable as HitErrorDisplay).OnNewJudgement;
|
||||||
|
(drawable as HitErrorDisplay).HitWindows = hitWindows;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if (HealthDisplay is StandardHealthDisplay shd)
|
if (HealthDisplay is StandardHealthDisplay shd)
|
||||||
processor.NewJudgement += shd.Flash;
|
processor.NewJudgement += shd.Flash;
|
||||||
|
Loading…
Reference in New Issue
Block a user