HP -> Health

This commit is contained in:
Dean Herbert
2017-01-18 11:08:16 +08:00
parent a3770adbc5
commit cd8c9393f3
3 changed files with 7 additions and 7 deletions

View File

@ -9,12 +9,12 @@ using System;
namespace osu.Game.Modes.UI namespace osu.Game.Modes.UI
{ {
public class HPDisplay : Container public class HealthDisplay : Container
{ {
private Box background; private Box background;
private Box fill; private Box fill;
public HPDisplay() public HealthDisplay()
{ {
Children = new Drawable[] Children = new Drawable[]
{ {

View File

@ -17,14 +17,14 @@ namespace osu.Game.Modes.UI
public ComboCounter ComboCounter; public ComboCounter ComboCounter;
public ScoreCounter ScoreCounter; public ScoreCounter ScoreCounter;
public PercentageCounter AccuracyCounter; public PercentageCounter AccuracyCounter;
public HPDisplay HPDisplay; public HealthDisplay HealthDisplay;
public Score Score { get; set; } public Score Score { get; set; }
protected abstract KeyCounterCollection CreateKeyCounter(); protected abstract KeyCounterCollection CreateKeyCounter();
protected abstract ComboCounter CreateComboCounter(); protected abstract ComboCounter CreateComboCounter();
protected abstract PercentageCounter CreateAccuracyCounter(); protected abstract PercentageCounter CreateAccuracyCounter();
protected abstract ScoreCounter CreateScoreCounter(); protected abstract ScoreCounter CreateScoreCounter();
protected virtual HPDisplay CreateHPDisplay() => new HPDisplay protected virtual HealthDisplay CreateHealthDisplay() => new HealthDisplay
{ {
Size = new Vector2(0.5f, 20), Size = new Vector2(0.5f, 20),
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
@ -53,7 +53,7 @@ namespace osu.Game.Modes.UI
ComboCounter = CreateComboCounter(), ComboCounter = CreateComboCounter(),
ScoreCounter = CreateScoreCounter(), ScoreCounter = CreateScoreCounter(),
AccuracyCounter = CreateAccuracyCounter(), AccuracyCounter = CreateAccuracyCounter(),
HPDisplay = CreateHPDisplay(), HealthDisplay = CreateHealthDisplay(),
}; };
} }
@ -63,7 +63,7 @@ namespace osu.Game.Modes.UI
processor.TotalScore.ValueChanged += delegate { ScoreCounter?.Set((ulong)processor.TotalScore.Value); }; processor.TotalScore.ValueChanged += delegate { ScoreCounter?.Set((ulong)processor.TotalScore.Value); };
processor.Accuracy.ValueChanged += delegate { AccuracyCounter?.Set((float)processor.Accuracy.Value); }; processor.Accuracy.ValueChanged += delegate { AccuracyCounter?.Set((float)processor.Accuracy.Value); };
processor.Combo.ValueChanged += delegate { ComboCounter?.Set((ulong)processor.Combo.Value); }; processor.Combo.ValueChanged += delegate { ComboCounter?.Set((ulong)processor.Combo.Value); };
processor.Health.ValueChanged += delegate { HPDisplay?.Set(processor.Health.Value); }; processor.Health.ValueChanged += delegate { HealthDisplay?.Set(processor.Health.Value); };
} }
} }
} }

View File

@ -70,7 +70,7 @@
<Compile Include="Modes\Objects\HitObjectParser.cs" /> <Compile Include="Modes\Objects\HitObjectParser.cs" />
<Compile Include="Modes\Score.cs" /> <Compile Include="Modes\Score.cs" />
<Compile Include="Modes\ScoreProcesssor.cs" /> <Compile Include="Modes\ScoreProcesssor.cs" />
<Compile Include="Modes\UI\HPDisplay.cs" /> <Compile Include="Modes\UI\HealthDisplay.cs" />
<Compile Include="Online\API\IOnlineComponent.cs" /> <Compile Include="Online\API\IOnlineComponent.cs" />
<Compile Include="Online\API\Requests\GetUserRequest.cs" /> <Compile Include="Online\API\Requests\GetUserRequest.cs" />
<Compile Include="Overlays\DragBar.cs" /> <Compile Include="Overlays\DragBar.cs" />