public void onClick() { //if (!doubleClickTimer.countingDown) //{ // doubleClickTimer.StartCountdown(); // withinTimeLimit = true; //} //else //{ // if (withinTimeLimit) // { HostedGameLobbies hostedGameLobbiesScript = GetComponentInParent <HostedGameLobbies>(); hostedGameLobbiesScript.RemoveRefreshHostedGamesListener(); //ChallengeManager challengeManager = GameObject.Find("ChallengeManager").GetComponent<ChallengeManager>(); JoinPendingMatchRequest joinPendingMatch = new JoinPendingMatchRequest(); joinPendingMatch.SetMatchShortCode(matchShortCode); joinPendingMatch.SetPendingMatchId(gameID); joinPendingMatch.Send(OnJoinPendingMatchSuccess, OnJoinPendingMatchError); // RemoveAllHostedGames(); // } //} }
/// <summary> /// Begin a new asynchronous JoinPendingMatchRequest /// </summary> /// <param name="requestData"></param> /// <returns></returns> public async Task <JoinPendingMatchResponse> JoinPendingMatchRequestAsync(JoinPendingMatchRequest requestData) { var res = await Requestor.PostStringAsync(Urls.JoinPendingMatchRequest, JsonHelper.SerializeData(requestData)); return(JsonConvert.DeserializeObject <JoinPendingMatchResponse>(res.ResponseJson)); }
/// <summary> /// Begin a new JoinPendingMatchRequest /// </summary> /// <param name="requestData"></param> /// <returns></returns> public JoinPendingMatchResponse JoinPendingMatchRequest(JoinPendingMatchRequest requestData) { return(JsonConvert.DeserializeObject <JoinPendingMatchResponse>(Requestor.PostString(Urls.JoinPendingMatchRequest, JsonHelper.SerializeData(requestData)).ResponseJson)); }