fix(gamemanager): try to fix explanation stuck
This commit is contained in:
parent
68697c7b06
commit
c69c92d733
@ -96,12 +96,6 @@ public List<Question> GetQuestionsByPlayer(Player player)
|
|||||||
return playerQuestions;
|
return playerQuestions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void SetPlayersAreReady(int _state)
|
|
||||||
{
|
|
||||||
currentState = _state;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return all the propositions linked to a specific player.
|
/// Return all the propositions linked to a specific player.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -207,8 +207,8 @@ public void PlayerValidateNameAndServerRoom(string _name, string _code)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
myOnlineRoom = realtimeDB.Child("rooms").Child(_code);
|
myOnlineRoom = realtimeDB.Child("rooms").Child(_code);
|
||||||
//subscribe to it
|
//subscribe to it
|
||||||
myOnlineRoom.ValueChanged += OnRoomUpdate;
|
myOnlineRoom.ValueChanged += OnRoomUpdate;
|
||||||
//if room exists, join it
|
//if room exists, join it
|
||||||
JoinRoom(() =>
|
JoinRoom(() =>
|
||||||
{
|
{
|
||||||
@ -282,7 +282,6 @@ private void JoinRoom(Action callback_OnRoomJoined)
|
|||||||
public void StartGame()
|
public void StartGame()
|
||||||
{
|
{
|
||||||
// send Start Game
|
// send Start Game
|
||||||
myRoom.SetPlayersAreReady(1);
|
|
||||||
string JSON = JsonUtility.ToJson(myRoom);
|
string JSON = JsonUtility.ToJson(myRoom);
|
||||||
Debug.Log(JSON);
|
Debug.Log(JSON);
|
||||||
try
|
try
|
||||||
@ -290,7 +289,6 @@ public void StartGame()
|
|||||||
SendCurrentState(GameState.Explanation, () =>
|
SendCurrentState(GameState.Explanation, () =>
|
||||||
{
|
{
|
||||||
Debug.Log($"start the game", this);
|
Debug.Log($"start the game", this);
|
||||||
myRoom.currentState = (int)GameState.Explanation;
|
|
||||||
WaitingRoom.SetActive(false);
|
WaitingRoom.SetActive(false);
|
||||||
BeforeStart.SetActive(true);
|
BeforeStart.SetActive(true);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user