public void JoinRoom(MatchInfoSnapshot _match) { if (!HostGame.creatingRoom && !JoiningGame) { JoiningGame = true; HostButton.SetActive(false); NicknameText.SetActive(false); RoomNameText.SetActive(false); RefreshButton.SetActive(false); Status.text = "Joining..."; networkManager.matchMaker.JoinMatch(_match.networkId, "", "", "", 0, 0, networkManager.OnMatchJoined); ClearRoomList(); } else { Status.text = "Wait for the room to be created"; } }
public void CreateRoom() { if (!JoinGame.JoiningGame && !creatingRoom) { if (roomName != "" && roomName != null && playerName != "" && playerName != null) { Status.text = "Creating room..."; creatingRoom = true; HostButton.SetActive(false); NicknameText.SetActive(false); RoomNameText.SetActive(false); RefreshButton.SetActive(false); joinGame.ClearRoomList(); networkManager.matchMaker.CreateMatch(roomName, roomSize, true, "", "", "", 0, 0, networkManager.OnMatchCreate); } else { Debug.Log("erro"); } } }
void Awake() { rNT = this; }