aboutsummaryrefslogtreecommitdiffstats
path: root/code/ui/phase/PhaseTimer.razor
diff options
context:
space:
mode:
authorLeonardo Bishop <me@leonardobishop.com>2023-08-06 17:21:45 +0100
committerLeonardo Bishop <me@leonardobishop.com>2023-08-06 17:21:45 +0100
commit0bba89a7858ce091f485e04284f853e1f7f304af (patch)
tree89ba42616e0f245cc84c96cc5b353eea117057d0 /code/ui/phase/PhaseTimer.razor
parent87d74b50bf443bf199be05bd03afdca6ece082ff (diff)
ReformatHEADmaster
Diffstat (limited to 'code/ui/phase/PhaseTimer.razor')
-rw-r--r--code/ui/phase/PhaseTimer.razor28
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