//Room private void CreateOrJoinRoom(bool IsSender) { OnFriends = true; cancle = false; startTimer = false; //if (!PhotonNetwork.InLobby) // PhotonNetwork.JoinLobby(TypedLobby.Default); LoadingImage.SetActive(false); PanelRequests.SetActive(false); cancle = false; MainMenuCanvas.SetActive(false); WaitForCanvas.SetActive(true); string[] ExpectedUser = new string[1]; ExpectedUser[0] = SENDER_ID; RoomOptions roomOptions = new RoomOptions(); roomOptions.MaxPlayers = 4; roomOptions.PublishUserId = true; PhotonNetwork.JoinOrCreateRoom(ROOM_NAME, roomOptions, TypedLobby.Default, ExpectedUser); }
public override void OnJoinedLobby() { if (OnNormalPlay) { cancle = false; mainmenuCanvas.SetActive(false); WaitForCanvas.SetActive(true); PhotonNetwork.JoinRandomRoom(); } }
public void OnClickCancle() { OnNormalPlay = false; if (PhotonNetwork.InRoom) { cancle = true; PhotonNetwork.CurrentRoom.IsVisible = false; PhotonNetwork.LeaveRoom(); mainmenuCanvas.SetActive(true); WaitForCanvas.SetActive(false); } else { cancle = true; mainmenuCanvas.SetActive(true); WaitForCanvas.SetActive(false); PhotonNetwork.LeaveRoom(); PhotonNetwork.LeaveLobby(); } ExitRoom = true; }