fix timer
This commit is contained in:
parent
a8b7ae964c
commit
981213e6ae
@ -20,7 +20,7 @@ public class PropositionFrame : MonoBehaviour
|
||||
|
||||
public void Initialize(Proposition _proposition)
|
||||
{
|
||||
Debug.Log($"Initializing {_proposition.owner}'s proposition", this);
|
||||
Debug.Log($"Initializing {_proposition.owner.name}'s proposition", this);
|
||||
proposition = _proposition;
|
||||
playerName.text = proposition.owner.name;
|
||||
|
||||
|
@ -398,6 +398,7 @@ private void CheckPlayersPropositions()
|
||||
|
||||
foreach (var propositionsByPlayer in propositionsPerPlayers)
|
||||
{
|
||||
Debug.Log("proposition");
|
||||
foreach (Proposition p in propositionsByPlayer.Value)
|
||||
{
|
||||
if (string.IsNullOrEmpty(p.photoUrl))
|
||||
|
@ -40,7 +40,8 @@ private void Update()
|
||||
|
||||
if (DateTime.Now < endOfTimer)
|
||||
{
|
||||
timerLabel.text = (endOfTimer - DateTime.Now).TotalSeconds.ToString("D2");
|
||||
TimeSpan duration = endOfTimer - DateTime.Now;
|
||||
timerLabel.text = ((int)duration.TotalSeconds).ToString("D2");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -130,6 +131,9 @@ private void OnQuestionChanged(object sender, ValueChangedEventArgs _questionRef
|
||||
|
||||
private void UpdateVoters()
|
||||
{
|
||||
if (currentQuestion.propositions.Count == 0) //manage if there is no propositons
|
||||
return;
|
||||
|
||||
if (currentQuestion.propositions[0] != null)
|
||||
{
|
||||
List<Player> playersThatHasVotedForFirstProposition = new List<Player>();
|
||||
|
Loading…
Reference in New Issue
Block a user