private static void UpdatedGame(Message m) { print("Received: updated_game_lobby"); LobbyGame g = m.payload["game"].ToObject <LobbyGame>(); MenuServerLobby.UpdateGame(g); MenuGameLobby.UpdateGameIfActive(g); }
private static void LeftGame(Message m) { print("Received: left_game_lobby"); LobbyGame g = m.payload["game"].ToObject <LobbyGame>(); MenuServerLobby.UpdateGame(g); MenuGameLobby.UpdateGameIfActive(g); if (m.payload["player"].ToObject <LobbyPlayer>().id == NetworkManager.my_id) { MenuGameLobby.leftGame = true; } }