diff --git a/Assets/Scripts/GameManager.cs b/Assets/Scripts/GameManager.cs index be02ebd..93d919e 100644 --- a/Assets/Scripts/GameManager.cs +++ b/Assets/Scripts/GameManager.cs @@ -317,11 +317,13 @@ private void OnRoomUpdate(object sender, ValueChangedEventArgs e) { case (int)GameState.WaitingForOtherPlayersToJoin: { - if(CheckIfIAmTheFirst(myRoom.GetPlayerList())) + List players = myRoom.GetOrderedPlayerList(); + UpdateDisplayedListUser(players); + + if (players.Count >= 3 && CheckIfIAmTheFirst(players)) { submitStartGame.SetActive(true); } - UpdateDisplayedListUser(myRoom.GetOrderedPlayerList()); break; } default: @@ -509,13 +511,18 @@ private void OnCurrentQuestionChanged(object sender, ValueChangedEventArgs onlin Question q = myRoom.questions[questionId]; - if (WaitingOtherPlayers.activeInHierarchy) + //do not vote for your question + if(myRoom.GetQuestionsByPlayer(currentPlayer).Contains(q)) { - WaitingOtherPlayers.SetActive(false); - VotePicture.SetActive(true); + WaitingOtherPlayers.SetActive(true); + VotePicture.SetActive(false); + } + else + { + VotePicture.SetActive(true); + WaitingOtherPlayers.SetActive(false); + VotePicture.GetComponent().ShowQuestion(q); } - VotePicture.GetComponent().ShowQuestion(q); - } ///