From 869635c5ccfc086bdf6cc19777bc5c844a2d45bd Mon Sep 17 00:00:00 2001 From: Fangh Date: Sun, 28 Jan 2024 17:47:58 +0100 Subject: [PATCH 1/2] fix things --- Assets/Scenes/ComputerView.unity | 18 ++++++++++++++++++ Assets/Scripts/VotingPage.cs | 3 +++ 2 files changed, 21 insertions(+) diff --git a/Assets/Scenes/ComputerView.unity b/Assets/Scenes/ComputerView.unity index 2d10afc..daf72aa 100644 --- a/Assets/Scenes/ComputerView.unity +++ b/Assets/Scenes/ComputerView.unity @@ -1789,6 +1789,7 @@ GameObject: - component: {fileID: 375256413} - component: {fileID: 375256412} - component: {fileID: 375256415} + - component: {fileID: 375256416} m_Layer: 0 m_Name: '[Managers]' m_TagString: Untagged @@ -1890,6 +1891,23 @@ MonoBehaviour: clip: {fileID: 8300000, guid: d782d7e00ee5a0d40a3c005d87c15b3a, type: 3} - title: 3 clip: {fileID: 8300000, guid: e1135788bf319bd42b6ca512976f9028, type: 3} +--- !u!114 &375256416 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 375256411} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0735c225bee4c490bbef74cb455fa748, type: 3} + m_Name: + m_EditorClassIdentifier: + promptList: {fileID: 11400000, guid: 21907abc84e40403ca34c4fb9ab30b06, type: 2} + addPrompt: + k__BackingField: + k__BackingField: + k__BackingField: --- !u!1 &411140634 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/VotingPage.cs b/Assets/Scripts/VotingPage.cs index 88b9c28..93469e0 100644 --- a/Assets/Scripts/VotingPage.cs +++ b/Assets/Scripts/VotingPage.cs @@ -40,6 +40,9 @@ private void Update() if (DateTime.Now < endOfTimer) { + Debug.Log(DateTime.Now); + Debug.Log(endOfTimer); + Debug.Log((DateTime.Now - endOfTimer).TotalSeconds); timerLabel.text = (DateTime.Now - endOfTimer).TotalSeconds.ToString("D2"); } else From 7a6e711bb5637ed969503799f28ef6b951354e33 Mon Sep 17 00:00:00 2001 From: Fangh Date: Sun, 28 Jan 2024 17:53:37 +0100 Subject: [PATCH 2/2] fix timer of vote --- Assets/Scripts/VotingPage.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Assets/Scripts/VotingPage.cs b/Assets/Scripts/VotingPage.cs index 93469e0..9a97463 100644 --- a/Assets/Scripts/VotingPage.cs +++ b/Assets/Scripts/VotingPage.cs @@ -40,10 +40,7 @@ private void Update() if (DateTime.Now < endOfTimer) { - Debug.Log(DateTime.Now); - Debug.Log(endOfTimer); - Debug.Log((DateTime.Now - endOfTimer).TotalSeconds); - timerLabel.text = (DateTime.Now - endOfTimer).TotalSeconds.ToString("D2"); + timerLabel.text = (endOfTimer - DateTime.Now).TotalSeconds.ToString("D2"); } else {