internal void CreateMatch(TurnBasedMatchConfig config,
                           Action <TurnBasedMatchResponse> callback)
 {
     TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_CreateTurnBasedMatch(mGameServices.AsHandle(),
                                                                                  config.AsPointer(), InternalTurnBasedMatchCallback,
                                                                                  ToCallbackPointer(callback));
 }
 public void CreateQuickMatch(uint minOpponents, uint maxOpponents, uint variant, ulong exclusiveBitmask, Action <bool, GooglePlayGames.BasicApi.Multiplayer.TurnBasedMatch> callback)
 {
     callback = Callbacks.AsOnGameThreadCallback <bool, GooglePlayGames.BasicApi.Multiplayer.TurnBasedMatch>(callback);
     using (GooglePlayGames.Native.PInvoke.TurnBasedMatchConfigBuilder matchConfigBuilder = GooglePlayGames.Native.PInvoke.TurnBasedMatchConfigBuilder.Create())
     {
         matchConfigBuilder.SetVariant(variant).SetMinimumAutomatchingPlayers(minOpponents).SetMaximumAutomatchingPlayers(maxOpponents).SetExclusiveBitMask(exclusiveBitmask);
         using (GooglePlayGames.Native.PInvoke.TurnBasedMatchConfig config = matchConfigBuilder.Build())
             this.mTurnBasedManager.CreateMatch(config, this.BridgeMatchToUserCallback((Action <GooglePlayGames.BasicApi.UIStatus, GooglePlayGames.BasicApi.Multiplayer.TurnBasedMatch>)((status, match) => callback(status == GooglePlayGames.BasicApi.UIStatus.Valid, match))));
     }
 }
 public void CreateWithInvitationScreen(uint minOpponents, uint maxOpponents, uint variant, Action <GooglePlayGames.BasicApi.UIStatus, GooglePlayGames.BasicApi.Multiplayer.TurnBasedMatch> callback)
 {
     callback = Callbacks.AsOnGameThreadCallback <GooglePlayGames.BasicApi.UIStatus, GooglePlayGames.BasicApi.Multiplayer.TurnBasedMatch>(callback);
     this.mTurnBasedManager.ShowPlayerSelectUI(minOpponents, maxOpponents, true, (Action <PlayerSelectUIResponse>)(result =>
     {
         if (result.Status() != CommonErrorStatus.UIStatus.VALID)
         {
             callback((GooglePlayGames.BasicApi.UIStatus)result.Status(), (GooglePlayGames.BasicApi.Multiplayer.TurnBasedMatch)null);
         }
         using (GooglePlayGames.Native.PInvoke.TurnBasedMatchConfigBuilder matchConfigBuilder = GooglePlayGames.Native.PInvoke.TurnBasedMatchConfigBuilder.Create())
         {
             matchConfigBuilder.PopulateFromUIResponse(result).SetVariant(variant);
             using (GooglePlayGames.Native.PInvoke.TurnBasedMatchConfig config = matchConfigBuilder.Build())
                 this.mTurnBasedManager.CreateMatch(config, this.BridgeMatchToUserCallback(callback));
         }
     }));
 }
Exemple #4
0
 internal uint MinimumAutomatchingPlayers() =>
 TurnBasedMatchConfig.TurnBasedMatchConfig_MinimumAutomatchingPlayers(base.SelfPtr());
Exemple #5
0
 internal long ExclusiveBitMask() =>
 TurnBasedMatchConfig.TurnBasedMatchConfig_ExclusiveBitMask(base.SelfPtr());
Exemple #6
0
 protected override void CallDispose(HandleRef selfPointer)
 {
     TurnBasedMatchConfig.TurnBasedMatchConfig_Dispose(selfPointer);
 }