fix: waiting 4sec instead of stopping votes directly

This commit is contained in:
Fangh 2024-02-01 22:38:58 +01:00
parent b03704c971
commit 9a23f40604

View File

@ -47,13 +47,10 @@ private void Update()
TimeSpan duration = endOfTimer - DateTime.Now; TimeSpan duration = endOfTimer - DateTime.Now;
timerLabel.text = ((int)duration.TotalSeconds).ToString("D2"); 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); Debug.Log("All players have voted. So I put only 4sec to look at the winner.", this);
if(endOfTimer > DateTime.Now.AddSeconds(5)) endOfTimer = DateTime.Now.AddSeconds(4);
{
endOfTimer = DateTime.Now.AddSeconds(5);
}
} }
} }
else else