public void OnPlayerLeftRoom(Player otherPlayer) { if (otherPlayer.IsMasterClient) { NetworkManager.Instance.RoomController.LeaveRoom(); MessageBox.CreateOneButtonType("방장이 방에서 나갔습니다", "Close", BackButton); } }
void CreateRoomFailed(short returnCode, string message) { if (!gameObject.activeSelf) { return; } m_WaitingRoomConnectUI.gameObject.SetActive(false); MessageBox.CreateOneButtonType("방을 생성하지 못했습니다. " + returnCode.ToString(), "Close", Close); }
public void CreateRoomButton() { if (GameManager.Instance.m_PlayerData.m_CurrentStamina < m_QuestData.m_StaminaValue) // 네트워크 확인 필요 { MessageBox.CreateOneButtonType("스테미나가 부족합니다"); return; } m_LobbyCanvasUI.GetWaitingRoomUI().CreateWaitingRoom(m_QuestData); }
void JoinRoom() { if (GameManager.Instance.m_PlayerData.m_CurrentStamina < m_QuestData.m_StaminaValue) { MessageBox.CreateOneButtonType("스테미나가 부족합니다"); return; } m_LobbyCanvasUI.GetWaitingRoomUI().JoinWaitingRoom(m_RoomName); }
void JoinRoomFailed(short returnCode, string message) { if (!gameObject.activeSelf) { return; } m_WaitingRoomConnectUI.gameObject.SetActive(false); MessageBox.CreateOneButtonType("방에 들어가지 못했습니다. " + returnCode.ToString(), "Close", Close); m_LobbyCanvasUI.GetQuestUI().RoomListRefresh(); }
public void QuestStart() { if (GameManager.Instance.m_PlayerData.m_CurrentStamina < m_QuestData.m_StaminaValue) { MessageBox.CreateOneButtonType("스테미나가 부족합니다"); return; } ExitGames.Client.Photon.Hashtable hash = new ExitGames.Client.Photon.Hashtable(); hash[Main_Stage.MultiPlayKey] = m_QuestData.m_Multiplay; NetworkManager.Instance.CreateRoom(NetworkManager.Instance.CreateInstanceRoomName(), "single", hash, false, false, 1); // 임시 방 생성 코드 SceneManager.Instance.LoadScene(m_QuestData.m_SceneName); }
void ReinforceItem() { if (ItemDataViewer.DefaultInstance.GetCurrentTargetItem().GetItemType() == Item.E_TYPE.EQUIPMENT) { EquipmentItem item = m_Item as EquipmentItem; EquipmentItem titem = ItemDataViewer.DefaultInstance.GetCurrentTargetItem() as EquipmentItem; if (!item || !titem) { return; } if (item.m_EquipState.IsEquip) { MessageBox.CreateOneButtonType("장착중인 아이템은 강화재료로 사용 할 수 없습니다"); return; } if (item.GetReinforceCount() > 0) { MessageBox.CreateTwoButtonType("이 아이템은 강화가 되어있습니다. 정말로 재료로 사용하시겠습니까?", "YES", ReinforceItemSuccess, "NO"); return; } } else if (ItemDataViewer.DefaultInstance.GetCurrentTargetItem().GetItemType() == Item.E_TYPE.CHARACTER) { CharacterItem item = m_Item as CharacterItem; CharacterItem titem = ItemDataViewer.DefaultInstance.GetCurrentTargetItem() as CharacterItem; if (!item || !titem) { return; } if (item.m_EquipState.IsEquip) { MessageBox.CreateOneButtonType("장착중인 아이템은 강화재료로 사용 할 수 없습니다"); return; } if (item.GetReinforceCount() > 0) { MessageBox.CreateTwoButtonType("이 아이템은 강화가 되어있습니다. 정말로 재료로 사용하시겠습니까?", "YES", ReinforceItemSuccess, "NO"); return; } } ReinforceItemSuccess(); }
public void QuestSelect() { if (m_QuestData.m_Lock) { MessageBox.CreateOneButtonType("이 퀘스트는 현재 잠겨있습니다"); return; } if (m_QuestData.m_Multiplay) { //m_LobbyCanvasUI.GetWaitingRoomUI().CreateWaitingRoom(m_QuestData.m_SceneName); m_LobbyCanvasUI.GetQuestUI().OpenQuestMultiTypeSelectUI(m_QuestData); } else { Debug.Log(m_NameText.text); MessageBox.CreateTwoButtonType(m_QuestData.m_Name + "미션을 도전하시겠습니까?", "YES", QuestStart); } }
public void StartButton() { Player[] players = PhotonNetwork.PlayerListOthers; bool allready = true; foreach (Player p in players) { if (!NetworkManager.Instance.RoomController.GetOtherPlayerPropertie <bool>(p, WaitingRoomSlot.m_ReadyKey)) { allready = false; } } if (!allready) { MessageBox.CreateOneButtonType("준비완료 상태가 아닌 플레이어가 있습니다"); return; } WaitingRoomGameStart(); }