bool OnStatusMatchAck(ERandomwarsMatchErrorCode errorCode, string playerSessionId, string ipAddress, int port) { if (string.IsNullOrEmpty(playerSessionId)) { if (NetMatchStep != Global.E_MATCHSTEP.MATCH_CANCEL) { if (matchSendCount < 30) { StartCoroutine(WaitForMatch()); } else { UI_SearchingPopup searchingPopup = FindObjectOfType <UI_SearchingPopup>(); searchingPopup.ClickSearchingCancelResult(); UI_Main.Get().ShowMessageBox("매칭 실패", "매칭에 실패했습니다. 다시 시도해주세요."); } } } else { NetMatchStep = Global.E_MATCHSTEP.MATCH_CONNECT; ConnectServer(playType, ipAddress, port, playerSessionId); } return(true); }
public void StopMatchReq(string ticketId) { if (NetMatchStep == Global.E_MATCHSTEP.MATCH_CANCEL) { return; } NetMatchStep = Global.E_MATCHSTEP.MATCH_CANCEL; session.MatchTemplate.MatchCancelReq(session.HttpClient, ticketId, OnStopMatchAck); }
bool OnStopMatchAck(ERandomwarsMatchErrorCode errorCode) { if (errorCode == ERandomwarsMatchErrorCode.Success) { UI_Main.Get().searchingPopup.ClickSearchingCancelResult(); } else { NetMatchStep = Global.E_MATCHSTEP.MATCH_START; } return(true); }
public bool OnStartMatchAck(ERandomwarsMatchErrorCode errorCode, string ticketId) { if (string.IsNullOrEmpty(ticketId)) { UnityUtil.Print("ticket id null"); return(false); } NetMatchStep = Global.E_MATCHSTEP.MATCH_NONE; UserInfoManager.Get().SetTicketId(ticketId); StartCoroutine(WaitForMatch()); return(true); }
public void StartMatchReq(EGameMode gameMode, int deckIndex) { if (NetMatchStep == Global.E_MATCHSTEP.MATCH_START || NetMatchStep == Global.E_MATCHSTEP.MATCH_CONNECT) { // 매칭 중이면 요청할 수 없다. return; } matchSendCount = 0; NetMatchStep = Global.E_MATCHSTEP.MATCH_START; session.MatchTemplate.MatchRequestReq(session.HttpClient, (int)gameMode, deckIndex, OnStartMatchAck); }