diff options
| author | Leonardo Bishop <me@leonardobishop.com> | 2023-07-27 22:30:22 +0100 |
|---|---|---|
| committer | Leonardo Bishop <me@leonardobishop.com> | 2023-07-27 22:30:22 +0100 |
| commit | 8b69e65e51507118b014a0426ae6f957b78a0707 (patch) | |
| tree | c1507990c5f5cc05a4e9000c295618ac85524f9a /code/ui/health | |
| parent | 71db52c5443a7bf82d9a23a770994a42b043be04 (diff) | |
Reformat
Diffstat (limited to 'code/ui/health')
| -rw-r--r-- | code/ui/health/Health.razor | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/code/ui/health/Health.razor b/code/ui/health/Health.razor index 9d7037b..3da2c01 100644 --- a/code/ui/health/Health.razor +++ b/code/ui/health/Health.razor @@ -6,33 +6,33 @@ <style>
Health {
- width: 400px;
- height: 100%;
- background-color: rgba(0, 0, 0, 0.90);
+ width: 400px;
+ height: 100%;
+ background-color: rgba(0, 0, 0, 0.90);
}
.fill {
- height: 100%;
- transition: width 0.2s ease-out;
+ height: 100%;
+ transition: width 0.2s ease-out;
}
</style>
<div class="fill" style="background-color: @(Colour); width: @(GetHealth())%;"></div>
@code
{
- public string Colour { get; set; }
+ public string Colour { get; set; }
- public int GetHealth()
- {
- var ClientPawn = Game.LocalPawn;
- if (ClientPawn is Player)
- {
- return ClientPawn.Health.CeilToInt();
- }
- return 0;
- }
+ public int GetHealth()
+ {
+ var ClientPawn = Game.LocalPawn;
+ if (ClientPawn is Player)
+ {
+ return ClientPawn.Health.CeilToInt();
+ }
+ return 0;
+ }
- protected override int BuildHash()
- {
- return GetHealth().GetHashCode();
- }
+ protected override int BuildHash()
+ {
+ return GetHealth().GetHashCode();
+ }
}
|
