public void AcceptFromInbox(Action <bool, TurnBasedMatch> callback) { callback = Callbacks.AsOnGameThreadCallback(callback); mTurnBasedManager.ShowInboxUI(callbackResult => { using (var match = callbackResult.Match()) { if (match == null) { callback(false, null); } else { var converted = match.AsTurnBasedMatch(mNativeClient.GetUserId()); Logger.d("Passing converted match to user callback:" + converted); callback(true, converted); } } }); }
public void AcceptFromInbox(Action <bool, GooglePlayGames.BasicApi.Multiplayer.TurnBasedMatch> callback) { callback = Callbacks.AsOnGameThreadCallback(callback); mTurnBasedManager.ShowInboxUI(delegate(TurnBasedManager.MatchInboxUIResponse callbackResult) { using (NativeTurnBasedMatch nativeTurnBasedMatch = callbackResult.Match()) { if (nativeTurnBasedMatch == null) { callback(false, null); } else { GooglePlayGames.BasicApi.Multiplayer.TurnBasedMatch turnBasedMatch = nativeTurnBasedMatch.AsTurnBasedMatch(mNativeClient.GetUserId()); Logger.d("Passing converted match to user callback:" + turnBasedMatch); callback(true, turnBasedMatch); } } }); }