From 63bcb59d72e3e16a3530495e7463602f94e6de71 Mon Sep 17 00:00:00 2001 From: Fangh Date: Sun, 4 Feb 2024 13:11:24 +0100 Subject: [PATCH] wip --- Assets/Scripts/GameManager.cs | 2 +- Assets/Scripts/WaitForPropositionsPage.cs | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/GameManager.cs b/Assets/Scripts/GameManager.cs index 03acb0c..0946c00 100644 --- a/Assets/Scripts/GameManager.cs +++ b/Assets/Scripts/GameManager.cs @@ -505,7 +505,7 @@ public void onClickNewPlayers() private void OnCurrentQuestionChanged(object sender, ValueChangedEventArgs onlineValue) { - if (onlineValue == null || onlineValue.Snapshot == null || onlineValue.Snapshot.Value == null) + if (onlineValue == null || onlineValue.Snapshot == null || onlineValue.Snapshot.Value == null || myRoom.questions == null || myRoom.questions.Count == 0) return; int questionId = onlineValue.Snapshot.Value.ConvertTo(); diff --git a/Assets/Scripts/WaitForPropositionsPage.cs b/Assets/Scripts/WaitForPropositionsPage.cs index f21206d..91d8bb9 100644 --- a/Assets/Scripts/WaitForPropositionsPage.cs +++ b/Assets/Scripts/WaitForPropositionsPage.cs @@ -26,6 +26,10 @@ public void Initialize(Room _myRoom, Action _onPropositionFinish) myRoom = _myRoom; allPlayersHasProposedTwoPictures = false; playersIdWhoHaveProposed.Clear(); + foreach(TextMeshProUGUI label in playerLabels) + { + label.color = Color.white; + } ShowPlayerLabels(); }