fix: restarts buttons were not plugged

This commit is contained in:
Fangh 2024-01-31 23:48:09 +01:00
parent b7f6de5d78
commit 70b9bee50a

View File

@ -463,7 +463,7 @@ public void onClickSamePlayers()
myRoom.currentState = (int)GameState.Explanation; myRoom.currentState = (int)GameState.Explanation;
myRoom.questions = null; myRoom.questions = null;
myRoom.currentQuestionId = 0; myRoom.currentQuestionId = 0;
string json = JsonUtility.ToJson(myRoom); string json = JsonConvert.SerializeObject(myRoom);
myOnlineRoom.SetRawJsonValueAsync(json).ContinueWithOnMainThread(task => myOnlineRoom.SetRawJsonValueAsync(json).ContinueWithOnMainThread(task =>
{ {
@ -480,7 +480,7 @@ public void onClickNewPlayers()
myRoom.currentQuestionId = 0; myRoom.currentQuestionId = 0;
myRoom.questions = null; myRoom.questions = null;
myRoom.players = null; myRoom.players = null;
string json = JsonUtility.ToJson(myRoom); string json = JsonConvert.SerializeObject(myRoom);
myOnlineRoom.SetRawJsonValueAsync(json).ContinueWithOnMainThread(task => myOnlineRoom.SetRawJsonValueAsync(json).ContinueWithOnMainThread(task =>
{ {