void Update() { ConnectPanel.SetActive(!isConnect); LobbyPanel.SetActive(inLobby); CreateRoomPanel.SetActive(inCreateRoom); JoinRoomPanel.SetActive(inJoinRoom); ChatPanel.SetActive(inChatRoom); if (inChatRoom == true) { if (Input.GetKeyDown(KeyCode.Return)) { SentBotton(); } if (Input.GetKeyDown(KeyCode.KeypadEnter)) { SentBotton(); } } LobbyUserName.text = "Hi ! \n{ " + myName + " }"; CreateRoomUserName.text = myName; JoinRoomUserName.text = myName; HereIs.text = "Here is... " + roomName + " !!!"; LoginPanel.SetActive(inLogin); RegisterPanel.SetActive(inRegister); RePasswordPanel.SetActive(inRePassword); }
// 패널 변경 void ShowPanel(GameObject CurPanel) { LobbyPanel.SetActive(false); DisconnectPanel.SetActive(false); RoomPanel.SetActive(false); LeaderBoardPanel.SetActive(false); CurPanel.SetActive(true); }
private void SwitchToPanel(GameObject panelToActivate) { panelToActivate.SetActive(true); if (MainMenuPanel != panelToActivate) { MainMenuPanel.SetActive(false); } if (LobbyPanel != panelToActivate) { LobbyPanel.SetActive(false); } if (RoomPanel != panelToActivate) { RoomPanel.SetActive(false); } }
// Click connect btn public void Click_JoinLobby() { MainPanel.SetActive(false); LobbyPanel.SetActive(true); PhotonNetwork.JoinLobby(); }