void OnCancelKeyPress() { if (Input.GetKeyDown(KeyCode.Escape) && isPopup == false) { isPopup = true; QuitPopup.show(new QuitPopupOptions { cancelButtonDelegate = () => { Debug.Log("cancel"); isPopup = false; }, okButtonDelegate = () => { Debug.Log("ok"); SceneManager.LoadScene("join_create"); isPopup = false; } }); } }
void OnCancelKeyPress() { //if (Application.platform == RuntimePlatform.Android) //{ if (Input.GetKeyDown(KeyCode.Escape) && isPopup == false) { isPopup = true; QuitPopup.show(new QuitPopupOptions { cancelButtonDelegate = () => { Debug.Log("cancel"); isPopup = false; }, okButtonDelegate = () => { Debug.Log("ok"); PhotonNetwork.Disconnect(); SceneManager.LoadScene("join_create"); isPopup = false; } }); } //} }
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////// 플레이어 퇴장 관련 함수들 ////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void OnCancelKeyPress() { //if (Application.platform == RuntimePlatform.Android) //{ if (Input.GetKeyDown(KeyCode.Escape) && isPopup == false) { isPopup = true; QuitPopup.show(new QuitPopupOptions { cancelButtonDelegate = () => { Debug.Log("cancel"); isPopup = false; }, okButtonDelegate = () => { Debug.Log("ok"); if (playerPosition != -1) // playerPosition이 설정 되지 않은 상태에선 그냥 창만 닫음 { pv.RPC("playerQuit", PhotonTargets.MasterClient, playerPosition); } else { PhotonNetwork.Disconnect(); SceneManager.LoadScene("join_create"); } isPopup = false; } }); } //} }