Hello,
I am creating a multiplayer game and I am having a problem.
When a client joins a lobby, he can see who is in the lobby and who is ready. I store the state (Ready or Not Ready) of all players in a list.
When the clients joins the lobby, he gets the list and I change the information he sees on screen (if each player is ready or not) according to it.
My prolem is that because it is a multiplayer game, the client gets the list before he gets all the lobby players names, meaning he can’t change the information on screen because it hasn’t yet appeared in the sceen.
How can I wait inside the function that is called when the client gets the list until all of the information has appeared on the screen? Can I make it like an await statement?
Thank you