Exemplo n.º 1
0
 internal IEnumerable <MultiplayerInvitation> Invitations()
 {
     return(PInvokeUtilities.ToEnumerable(
                TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_TurnBasedMatchesResponse_GetInvitations_Length(SelfPtr()),
                index => new MultiplayerInvitation(
                    TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_TurnBasedMatchesResponse_GetInvitations_GetElement(SelfPtr(), index))));
 }
Exemplo n.º 2
0
            internal int CompletedMatchesCount()
            {
                UIntPtr ptr =
                    TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_TurnBasedMatchesResponse_GetCompletedMatches_Length(SelfPtr());

                return((int)ptr.ToUInt32());
            }
Exemplo n.º 3
0
 internal IEnumerable <NativeTurnBasedMatch> CompletedMatches()
 {
     return(PInvokeUtilities.ToEnumerable(
                TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_TurnBasedMatchesResponse_GetCompletedMatches_Length(SelfPtr()),
                index => new NativeTurnBasedMatch(
                    TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_TurnBasedMatchesResponse_GetCompletedMatches_GetElement(SelfPtr(), index))));
 }
Exemplo n.º 4
0
 internal void ShowPlayerSelectUI(uint minimumPlayers, uint maxiumPlayers,
                                  bool allowAutomatching, Action <PlayerSelectUIResponse> callback)
 {
     TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_ShowPlayerSelectUI(mGameServices.AsHandle(), minimumPlayers,
                                                                                maxiumPlayers, allowAutomatching, InternalPlayerSelectUIcallback,
                                                                                Callbacks.ToIntPtr(callback, PlayerSelectUIResponse.FromPointer));
 }
Exemplo n.º 5
0
 internal void CreateMatch(TurnBasedMatchConfig config,
                           Action <TurnBasedMatchResponse> callback)
 {
     TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_CreateTurnBasedMatch(mGameServices.AsHandle(),
                                                                                  config.AsPointer(), InternalTurnBasedMatchCallback,
                                                                                  ToCallbackPointer(callback));
 }
Exemplo n.º 6
0
 internal void GetAllTurnbasedMatches(Action <TurnBasedMatchesResponse> callback)
 {
     TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_FetchMatches(mGameServices.AsHandle(),
                                                                          InternalTurnBasedMatchesCallback,
                                                                          Callbacks.ToIntPtr <TurnBasedMatchesResponse>(
                                                                              callback, TurnBasedMatchesResponse.FromPointer));
 }
Exemplo n.º 7
0
            internal int TheirTurnMatchesCount()
            {
                var ptr =
                    TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_TurnBasedMatchesResponse_GetTheirTurnMatches_Length(SelfPtr());

                return((int)ptr.ToUInt32());
            }
Exemplo n.º 8
0
 internal void AcceptInvitation(MultiplayerInvitation invitation,
                                Action <TurnBasedMatchResponse> callback)
 {
     Logger.d("Accepting invitation: " + invitation.AsPointer().ToInt64());
     TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_AcceptInvitation(mGameServices.AsHandle(),
                                                                              invitation.AsPointer(), InternalTurnBasedMatchCallback, ToCallbackPointer(callback));
 }
Exemplo n.º 9
0
 internal NativeTurnBasedMatch Match()
 {
     if (!this.RequestSucceeded())
     {
         return((NativeTurnBasedMatch)null);
     }
     return(new NativeTurnBasedMatch(TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_TurnBasedMatchResponse_GetMatch(this.SelfPtr())));
 }
Exemplo n.º 10
0
 internal NativeTurnBasedMatch Match()
 {
     if (this.UiStatus() != CommonErrorStatus.UIStatus.VALID)
     {
         return((NativeTurnBasedMatch)null);
     }
     return(new NativeTurnBasedMatch(TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_MatchInboxUIResponse_GetMatch(this.SelfPtr())));
 }
Exemplo n.º 11
0
 internal NativeTurnBasedMatch Match()
 {
     if (this.UiStatus() != GooglePlayGames.Native.Cwrapper.CommonErrorStatus.UIStatus.VALID)
     {
         return(null);
     }
     return(new NativeTurnBasedMatch(TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_MatchInboxUIResponse_GetMatch(base.SelfPtr())));
 }
Exemplo n.º 12
0
 internal void Rematch(NativeTurnBasedMatch match,
                       Action <TurnBasedMatchResponse> callback)
 {
     TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_Rematch(
         mGameServices.AsHandle(),
         match.AsPointer(),
         InternalTurnBasedMatchCallback,
         ToCallbackPointer(callback));
 }
Exemplo n.º 13
0
 internal void ConfirmPendingCompletion(NativeTurnBasedMatch match,
                                        Action <TurnBasedMatchResponse> callback)
 {
     TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_ConfirmPendingCompletion(
         mGameServices.AsHandle(),
         match.AsPointer(),
         InternalTurnBasedMatchCallback,
         ToCallbackPointer(callback));
 }
Exemplo n.º 14
0
 internal void CancelMatch(NativeTurnBasedMatch match,
                           Action <MultiplayerStatus> callback)
 {
     TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_CancelMatch(
         mGameServices.AsHandle(),
         match.AsPointer(),
         InternalMultiplayerStatusCallback,
         Callbacks.ToIntPtr(callback));
 }
Exemplo n.º 15
0
 internal void LeaveMatchDuringTheirTurn(NativeTurnBasedMatch match,
                                         Action <MultiplayerStatus> callback)
 {
     TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_LeaveMatchDuringTheirTurn(
         mGameServices.AsHandle(),
         match.AsPointer(),
         InternalMultiplayerStatusCallback,
         Callbacks.ToIntPtr(callback));
 }
Exemplo n.º 16
0
 internal void FinishMatchDuringMyTurn(NativeTurnBasedMatch match, byte[] data,
                                       ParticipantResults results, Action <TurnBasedMatchResponse> callback)
 {
     TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_FinishMatchDuringMyTurn(
         mGameServices.AsHandle(),
         match.AsPointer(),
         data,
         new UIntPtr((uint)data.Length),
         results.AsPointer(),
         InternalTurnBasedMatchCallback,
         ToCallbackPointer(callback)
         );
 }
Exemplo n.º 17
0
 internal void TakeTurn(NativeTurnBasedMatch match, byte[] data,
                        MultiplayerParticipant nextParticipant, Action <TurnBasedMatchResponse> callback)
 {
     TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_TakeMyTurn(
         mGameServices.AsHandle(),
         match.AsPointer(),
         data,
         new UIntPtr((uint)data.Length),
         // Just pass along the old results. Technically the API allows updates here, but
         // we never need them.
         match.Results().AsPointer(),
         nextParticipant.AsPointer(),
         InternalTurnBasedMatchCallback,
         ToCallbackPointer(callback));
 }
Exemplo n.º 18
0
 internal void CancelMatch(NativeTurnBasedMatch match, Action <CommonErrorStatus.MultiplayerStatus> callback)
 {
     TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_CancelMatch(this.mGameServices.AsHandle(), match.AsPointer(), new TurnBasedMultiplayerManager.MultiplayerStatusCallback(TurnBasedManager.InternalMultiplayerStatusCallback), Callbacks.ToIntPtr((Delegate)callback));
 }
Exemplo n.º 19
0
 protected override void CallDispose(HandleRef selfPointer)
 {
     TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_TurnBasedMatchesResponse_Dispose(SelfPtr());
 }
Exemplo n.º 20
0
 internal int CompletedMatchesCount()
 {
     return((int)TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_TurnBasedMatchesResponse_GetCompletedMatches_Length(this.SelfPtr()).ToUInt32());
 }
Exemplo n.º 21
0
 internal IEnumerable <NativeTurnBasedMatch> TheirTurnMatches()
 {
     return(PInvokeUtilities.ToEnumerable <NativeTurnBasedMatch>(TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_TurnBasedMatchesResponse_GetTheirTurnMatches_Length(this.SelfPtr()), (Func <UIntPtr, NativeTurnBasedMatch>)(index => new NativeTurnBasedMatch(TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_TurnBasedMatchesResponse_GetTheirTurnMatches_GetElement(this.SelfPtr(), index)))));
 }
Exemplo n.º 22
0
 internal void ShowPlayerSelectUI(uint minimumPlayers, uint maxiumPlayers, bool allowAutomatching, Action <PlayerSelectUIResponse> callback)
 {
     TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_ShowPlayerSelectUI(this.mGameServices.AsHandle(), minimumPlayers, maxiumPlayers, allowAutomatching, new TurnBasedMultiplayerManager.PlayerSelectUICallback(TurnBasedManager.InternalPlayerSelectUIcallback), Callbacks.ToIntPtr <PlayerSelectUIResponse>(callback, new Func <IntPtr, PlayerSelectUIResponse>(PlayerSelectUIResponse.FromPointer)));
 }
Exemplo n.º 23
0
 internal void GetMatch(string matchId, Action <TurnBasedMatchResponse> callback)
 {
     TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_FetchMatch(mGameServices.AsHandle(),
                                                                        matchId, InternalTurnBasedMatchCallback,
                                                                        ToCallbackPointer(callback));
 }
Exemplo n.º 24
0
 internal void ShowInboxUI(Action <TurnBasedManager.MatchInboxUIResponse> callback)
 {
     TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_ShowMatchInboxUI(this.mGameServices.AsHandle(), new TurnBasedMultiplayerManager.MatchInboxUICallback(TurnBasedManager.InternalMatchInboxUICallback), Callbacks.ToIntPtr <TurnBasedManager.MatchInboxUIResponse>(callback, new Func <IntPtr, TurnBasedManager.MatchInboxUIResponse>(TurnBasedManager.MatchInboxUIResponse.FromPointer)));
 }
Exemplo n.º 25
0
 internal void TakeTurn(NativeTurnBasedMatch match, byte[] data, MultiplayerParticipant nextParticipant, Action <TurnBasedManager.TurnBasedMatchResponse> callback)
 {
     TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_TakeMyTurn(this.mGameServices.AsHandle(), match.AsPointer(), data, new UIntPtr((uint)data.Length), match.Results().AsPointer(), nextParticipant.AsPointer(), new TurnBasedMultiplayerManager.TurnBasedMatchCallback(TurnBasedManager.InternalTurnBasedMatchCallback), TurnBasedManager.ToCallbackPointer(callback));
 }
Exemplo n.º 26
0
 internal CommonErrorStatus.MultiplayerStatus Status()
 {
     return(TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_TurnBasedMatchesResponse_GetStatus(SelfPtr()));
 }
Exemplo n.º 27
0
 internal void ShowInboxUI(Action <MatchInboxUIResponse> callback)
 {
     TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_ShowMatchInboxUI(mGameServices.AsHandle(),
                                                                              InternalMatchInboxUICallback,
                                                                              Callbacks.ToIntPtr <MatchInboxUIResponse>(callback, MatchInboxUIResponse.FromPointer));
 }
Exemplo n.º 28
0
 protected override void CallDispose(HandleRef selfPointer)
 {
     TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_MatchInboxUIResponse_Dispose(selfPointer);
 }
Exemplo n.º 29
0
 internal CommonErrorStatus.UIStatus UiStatus()
 {
     return(TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_MatchInboxUIResponse_GetStatus(SelfPtr()));
 }
Exemplo n.º 30
0
 internal void DeclineInvitation(MultiplayerInvitation invitation)
 {
     TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_DeclineInvitation(mGameServices.AsHandle(),
                                                                               invitation.AsPointer());
 }