void OnHostable(SocketIOEvent socketIOEvent) { var lobbyData = LobbyDataJson.CreateFromJson(socketIOEvent.data.ToString()); this.lobbyDataindex = lobbyData.indexLobby; this.isHost = true; GameCore.uiManager.UpdateLobbyData(lobbyData, true); }
void OnCountDown(SocketIOEvent socketIOEvent) { var resName = LobbyDataJson.CreateFromJson(socketIOEvent.data.ToString()); otherPlayerName = resName.hostName; GameCore.uiManager.ToGameScene(); GameCore.gamemanager.SetUp(); }
void OnJoinAble(SocketIOEvent socketIOEvent) { var lobbyData = LobbyDataJson.CreateFromJson(socketIOEvent.data.ToString()); this.isHost = false; this.lobbyDataindex = lobbyData.indexLobby; GameCore.uiManager.CloseLobbyListSection(); GameCore.uiManager.OpenLobbySection(); GameCore.uiManager.UpdateLobbyData(lobbyData, true); m_socketIoComponent.Emit("update lobby", new JSONObject(this.lobbyDataindex)); }
void OnSyncLobby(SocketIOEvent socketIOEvent) { var lobbyData = LobbyDataJson.CreateFromJson(socketIOEvent.data.ToString()); GameCore.uiManager.UpdateLobbyData(lobbyData, false); }