aboutsummaryrefslogtreecommitdiffstats
path: root/code/ui/phase/PhaseTimer.razor
diff options
context:
space:
mode:
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