aboutsummaryrefslogtreecommitdiffstats
path: root/code/ui/health/Health.razor
diff options
context:
space:
mode:
authorLeonardo Bishop <me@leonardobishop.com>2023-07-29 02:55:08 +0100
committerLeonardo Bishop <me@leonardobishop.com>2023-07-29 02:55:08 +0100
commit95b2259eb4d7362b137d26037f8312b3d80f0244 (patch)
tree430f4b61bba71e93802d0edaf61f97a162627666 /code/ui/health/Health.razor
parent743c93752eccb4d243c5869ec82dceb1c443acac (diff)
Add fall damage
Diffstat (limited to 'code/ui/health/Health.razor')
-rw-r--r--code/ui/health/Health.razor13
1 files changed, 10 insertions, 3 deletions
diff --git a/code/ui/health/Health.razor b/code/ui/health/Health.razor
index 3da2c01..c3c6660 100644
--- a/code/ui/health/Health.razor
+++ b/code/ui/health/Health.razor
@@ -10,12 +10,19 @@ Health {
height: 100%;
background-color: rgba(0, 0, 0, 0.90);
}
-.fill {
+.colour-bar {
height: 100%;
- transition: width 0.2s ease-out;
+}
+.transition-bar {
+ height: 100%;
+ transition: width 1s ease-out 0.5s;
+ position: absolute;
+ top: 0;
+ left: 0;
}
</style>
-<div class="fill" style="background-color: @(Colour); width: @(GetHealth())%;"></div>
+<div class="transition-bar" style="background-color: white; width: @(GetHealth())%;"></div>
+<div class="colour-bar" style="background-color: @(Colour); width: @(GetHealth())%;"></div>
@code
{