diff options
| author | Leonardo Bishop <me@leonardobishop.com> | 2023-08-06 17:21:45 +0100 |
|---|---|---|
| committer | Leonardo Bishop <me@leonardobishop.com> | 2023-08-06 17:21:45 +0100 |
| commit | 0bba89a7858ce091f485e04284f853e1f7f304af (patch) | |
| tree | 89ba42616e0f245cc84c96cc5b353eea117057d0 /code/ui/phase/PhaseTimer.razor | |
| parent | 87d74b50bf443bf199be05bd03afdca6ece082ff (diff) | |
Diffstat (limited to 'code/ui/phase/PhaseTimer.razor')
| -rw-r--r-- | code/ui/phase/PhaseTimer.razor | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/code/ui/phase/PhaseTimer.razor b/code/ui/phase/PhaseTimer.razor index 73f44e2..89766cb 100644 --- a/code/ui/phase/PhaseTimer.razor +++ b/code/ui/phase/PhaseTimer.razor @@ -1,9 +1,6 @@ -@using Sandbox;
-@using System
-@using Sandbox.UI;
-
@namespace MurderGame
-@inherits Panel
+@using System
+@inherits Sandbox.UI.Panel
<style>
phasetimer {
@@ -26,14 +23,15 @@ phasetimer { @if (HasTime())
{
-<smallbox class="box">
- @GetTime()
-</smallbox>
-} else
+ <smallbox class="box">
+ @GetTime()
+ </smallbox>
+}
+else
{
-<smallbox class="box">
- @GetPhase()
-</smallbox>
+ <smallbox class="box">
+ @GetPhase()
+ </smallbox>
}
@code
@@ -42,11 +40,13 @@ phasetimer { {
return MurderGame.Instance.CurrentPhase.TimeLeft >= 0;
}
+
public string GetTime()
{
- TimeSpan timeSpan = TimeSpan.FromSeconds(MurderGame.Instance.CurrentPhase.TimeLeft);
+ var timeSpan = TimeSpan.FromSeconds(MurderGame.Instance.CurrentPhase.TimeLeft);
return timeSpan.ToString(@"mm\:ss");
}
+
public string GetPhase()
{
return MurderGame.Instance.CurrentPhase.Title;
@@ -56,4 +56,4 @@ phasetimer { {
return HashCode.Combine(MurderGame.Instance.CurrentPhase.TimeLeft.GetHashCode(), MurderGame.Instance.CurrentPhase.Title.GetHashCode());
}
-}
+}
\ No newline at end of file |
