From 9a23f4060492c18c92a1256d3060c538138f707a Mon Sep 17 00:00:00 2001 From: Fangh Date: Thu, 1 Feb 2024 22:38:58 +0100 Subject: [PATCH] fix: waiting 4sec instead of stopping votes directly --- Assets/Scripts/VotingPage.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Assets/Scripts/VotingPage.cs b/Assets/Scripts/VotingPage.cs index 54a3e6a..86bdfc8 100644 --- a/Assets/Scripts/VotingPage.cs +++ b/Assets/Scripts/VotingPage.cs @@ -47,13 +47,10 @@ private void Update() TimeSpan duration = endOfTimer - DateTime.Now; timerLabel.text = ((int)duration.TotalSeconds).ToString("D2"); - if (allPlayersHaveVotedForCurrentQuestion) + if (allPlayersHaveVotedForCurrentQuestion && endOfTimer > DateTime.Now.AddSeconds(4)) { - Debug.Log("All players have voted. So I put only 5sec to look at the winner.", this); - if(endOfTimer > DateTime.Now.AddSeconds(5)) - { - endOfTimer = DateTime.Now.AddSeconds(5); - } + Debug.Log("All players have voted. So I put only 4sec to look at the winner.", this); + endOfTimer = DateTime.Now.AddSeconds(4); } } else