public void GetAllInvitations(Action <Invitation[]> callback) { mTurnBasedManager.GetAllTurnbasedMatches(delegate(TurnBasedManager.TurnBasedMatchesResponse allMatches) { Invitation[] array = new Invitation[allMatches.InvitationCount()]; int num = 0; foreach (GooglePlayGames.Native.PInvoke.MultiplayerInvitation item in allMatches.Invitations()) { array[num++] = item.AsInvitation(); } callback(array); }); }
public void GetAllInvitations(Action <Invitation[]> callback) { mTurnBasedManager.GetAllTurnbasedMatches(allMatches => { Invitation[] invites = new Invitation[allMatches.InvitationCount()]; int i = 0; foreach (var invitation in allMatches.Invitations()) { invites[i++] = invitation.AsInvitation(); } callback(invites); }); }
private void FindInvitationWithId(string invitationId, Action <MultiplayerInvitation> callback) { mTurnBasedManager.GetAllTurnbasedMatches(allMatches => { if (allMatches.Status() <= 0) { callback(null); return; } foreach (var invitation in allMatches.Invitations()) { using (invitation) { if (invitation.Id().Equals(invitationId)) { callback(invitation); return; } } } callback(null); }); }