mirror of
https://github.com/ppy/osu.git
synced 2025-02-14 06:33:17 +08:00
Apply review suggestions
This commit is contained in:
parent
a1274a9eb0
commit
e9f224b5e8
@ -35,7 +35,7 @@ namespace osu.Game.Rulesets.Catch.UI
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
Overlays.Add(new FaillingLayer());
|
Overlays.Add(new FailingLayer());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override ReplayInputHandler CreateReplayInputHandler(Replay replay) => new CatchFramedReplayInputHandler(replay);
|
protected override ReplayInputHandler CreateReplayInputHandler(Replay replay) => new CatchFramedReplayInputHandler(replay);
|
||||||
|
@ -54,7 +54,7 @@ namespace osu.Game.Rulesets.Mania.UI
|
|||||||
|
|
||||||
Config.BindWith(ManiaRulesetSetting.ScrollTime, TimeRange);
|
Config.BindWith(ManiaRulesetSetting.ScrollTime, TimeRange);
|
||||||
|
|
||||||
Overlays.Add(new FaillingLayer());
|
Overlays.Add(new FailingLayer());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -34,7 +34,7 @@ namespace osu.Game.Rulesets.Osu.UI
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
Overlays.Add(new FaillingLayer());
|
Overlays.Add(new FailingLayer());
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => true; // always show the gameplay cursor
|
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => true; // always show the gameplay cursor
|
||||||
|
@ -10,9 +10,9 @@ using osu.Game.Graphics;
|
|||||||
namespace osu.Game.Screens.Play.HUD
|
namespace osu.Game.Screens.Play.HUD
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An overlay layer on top of the playfield which fades to red when the current player health falls a certain threshold defined by <see cref="LowHealthThreshold"/>.
|
/// An overlay layer on top of the playfield which fades to red when the current player health falls below a certain threshold defined by <see cref="LowHealthThreshold"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class FaillingLayer : HealthDisplay
|
public class FailingLayer : HealthDisplay
|
||||||
{
|
{
|
||||||
private const float max_alpha = 0.4f;
|
private const float max_alpha = 0.4f;
|
||||||
|
|
||||||
@ -21,9 +21,9 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The threshold under which the current player life should be considered low and the layer should start fading in.
|
/// The threshold under which the current player life should be considered low and the layer should start fading in.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected virtual double LowHealthThreshold => 0.20f;
|
protected double LowHealthThreshold { get; set; } = 0.20f;
|
||||||
|
|
||||||
public FaillingLayer()
|
public FailingLayer()
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
Child = box = new Box
|
Child = box = new Box
|
@ -24,7 +24,7 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
/// Bind the tracked fields of <see cref="HealthProcessor"/> to this health display.
|
/// Bind the tracked fields of <see cref="HealthProcessor"/> to this health display.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="processor"></param>
|
/// <param name="processor"></param>
|
||||||
public virtual void BindHealthProcessor(HealthProcessor processor)
|
public void BindHealthProcessor(HealthProcessor processor)
|
||||||
{
|
{
|
||||||
Current.BindTo(processor.Health);
|
Current.BindTo(processor.Health);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user