fix: have preivous players
This commit is contained in:
parent
fa47e8fb8c
commit
b04804c677
@ -157,12 +157,6 @@ public void PlayerValidateNameAndServerRoom(string _name, string _code)
|
|||||||
WaitingRoom.SetActive(true);
|
WaitingRoom.SetActive(true);
|
||||||
HomeConnection.SetActive(false);
|
HomeConnection.SetActive(false);
|
||||||
|
|
||||||
List<Player> list = new List<Player>
|
|
||||||
{
|
|
||||||
currentPlayer
|
|
||||||
};
|
|
||||||
|
|
||||||
UpdateDisplayedListUser(list);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -303,7 +297,6 @@ private void OnRoomUpdate(object sender, ValueChangedEventArgs e)
|
|||||||
if (e?.Snapshot?.GetRawJsonValue() != null)
|
if (e?.Snapshot?.GetRawJsonValue() != null)
|
||||||
{
|
{
|
||||||
string JSON = e.Snapshot.GetRawJsonValue();
|
string JSON = e.Snapshot.GetRawJsonValue();
|
||||||
Debug.Log($"your room has been updated :\n{JSON}");
|
|
||||||
myRoom = JsonConvert.DeserializeObject<Room>(e.Snapshot.GetRawJsonValue());
|
myRoom = JsonConvert.DeserializeObject<Room>(e.Snapshot.GetRawJsonValue());
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -321,8 +314,6 @@ private void OnRoomUpdate(object sender, ValueChangedEventArgs e)
|
|||||||
{
|
{
|
||||||
case (int)GameState.WaitingForOtherPlayersToJoin:
|
case (int)GameState.WaitingForOtherPlayersToJoin:
|
||||||
{
|
{
|
||||||
Debug.Log("update player List");
|
|
||||||
Debug.Log(myRoom.GetPlayerList());
|
|
||||||
CheckIfIAmTheFirst(myRoom.GetPlayerList());
|
CheckIfIAmTheFirst(myRoom.GetPlayerList());
|
||||||
UpdateDisplayedListUser(myRoom.GetPlayerList());
|
UpdateDisplayedListUser(myRoom.GetPlayerList());
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user