private void CheckMatchState(GK_RTM_Match macth) { IOSNativePopUpManager.dismissCurrentAlert(); if (macth != null) { if (macth.ExpectedPlayerCount == 0) { IOSNativePopUpManager.showMessage("Match Started", "let's play now\n Macth.ExpectedPlayerCount): " + macth.ExpectedPlayerCount); m.enabled = true; b.enabled = false; d.enabled = true; ISN_Logger.Log("Sending HelloPackage "); HelloPackage p = new HelloPackage(); p.send(); } else { IOSNativePopUpManager.showMessage("Match Created", "Macth.ExpectedPlayerCount): " + macth.ExpectedPlayerCount); } } }
void HandleActionMatchStarted(GK_RTM_MatchStartedResult result) { IOSNativePopUpManager.dismissCurrentAlert(); if (result.IsSucceeded) { IOSNativePopUpManager.showMessage("Match Started", "let's play now\n Others players count: " + result.Match.Players.Count); } else { IOSNativePopUpManager.showMessage("Match Started Error", result.Error.Description); } }
void HandleActionDataReceived(GK_Player player, byte[] data) { IOSNativePopUpManager.dismissCurrentAlert(); #if (UNITY_IPHONE && !UNITY_EDITOR) || SA_DEBUG_MODE System.Text.UTF8Encoding enc = new System.Text.UTF8Encoding(); string str = enc.GetString(data); IOSNativePopUpManager.dismissCurrentAlert(); IOSNativePopUpManager.showMessage("Data received", "player ID: " + player.Id + " \n " + "data: " + str); #endif }
//-------------------------------------- // GET/SET //-------------------------------------- //-------------------------------------- // EVENTS //-------------------------------------- void HandleActionPlayerStateChanged(GK_Player player, GK_PlayerConnectionState state, GK_RTM_Match match) { IOSNativePopUpManager.dismissCurrentAlert(); IOSNativePopUpManager.showMessage("Player State Changed", player.Alias + " state: " + state.ToString() + "\n ExpectedPlayerCount: " + match.ExpectedPlayerCount); }
private void dismissAlert() { IOSNativePopUpManager.dismissCurrentAlert(); }