Esempio 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))));
 }
Esempio n. 2
0
            internal int CompletedMatchesCount()
            {
                UIntPtr ptr =
                    TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_TurnBasedMatchesResponse_GetCompletedMatches_Length(SelfPtr());

                return((int)ptr.ToUInt32());
            }
Esempio 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))));
 }
Esempio 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));
 }
Esempio n. 5
0
 internal void CreateMatch(TurnBasedMatchConfig config,
                           Action <TurnBasedMatchResponse> callback)
 {
     TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_CreateTurnBasedMatch(mGameServices.AsHandle(),
                                                                                  config.AsPointer(), InternalTurnBasedMatchCallback,
                                                                                  ToCallbackPointer(callback));
 }
Esempio n. 6
0
 internal void GetAllTurnbasedMatches(Action <TurnBasedMatchesResponse> callback)
 {
     TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_FetchMatches(mGameServices.AsHandle(),
                                                                          InternalTurnBasedMatchesCallback,
                                                                          Callbacks.ToIntPtr <TurnBasedMatchesResponse>(
                                                                              callback, TurnBasedMatchesResponse.FromPointer));
 }
Esempio n. 7
0
            internal int TheirTurnMatchesCount()
            {
                var ptr =
                    TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_TurnBasedMatchesResponse_GetTheirTurnMatches_Length(SelfPtr());

                return((int)ptr.ToUInt32());
            }
Esempio 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));
 }
Esempio n. 9
0
 internal NativeTurnBasedMatch Match()
 {
     if (!this.RequestSucceeded())
     {
         return((NativeTurnBasedMatch)null);
     }
     return(new NativeTurnBasedMatch(TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_TurnBasedMatchResponse_GetMatch(this.SelfPtr())));
 }
Esempio n. 10
0
 internal NativeTurnBasedMatch Match()
 {
     if (this.UiStatus() != CommonErrorStatus.UIStatus.VALID)
     {
         return((NativeTurnBasedMatch)null);
     }
     return(new NativeTurnBasedMatch(TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_MatchInboxUIResponse_GetMatch(this.SelfPtr())));
 }
Esempio 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())));
 }
Esempio n. 12
0
 internal void Rematch(NativeTurnBasedMatch match,
                       Action <TurnBasedMatchResponse> callback)
 {
     TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_Rematch(
         mGameServices.AsHandle(),
         match.AsPointer(),
         InternalTurnBasedMatchCallback,
         ToCallbackPointer(callback));
 }
Esempio n. 13
0
 internal void ConfirmPendingCompletion(NativeTurnBasedMatch match,
                                        Action <TurnBasedMatchResponse> callback)
 {
     TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_ConfirmPendingCompletion(
         mGameServices.AsHandle(),
         match.AsPointer(),
         InternalTurnBasedMatchCallback,
         ToCallbackPointer(callback));
 }
Esempio n. 14
0
 internal void CancelMatch(NativeTurnBasedMatch match,
                           Action <MultiplayerStatus> callback)
 {
     TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_CancelMatch(
         mGameServices.AsHandle(),
         match.AsPointer(),
         InternalMultiplayerStatusCallback,
         Callbacks.ToIntPtr(callback));
 }
Esempio n. 15
0
 internal void LeaveMatchDuringTheirTurn(NativeTurnBasedMatch match,
                                         Action <MultiplayerStatus> callback)
 {
     TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_LeaveMatchDuringTheirTurn(
         mGameServices.AsHandle(),
         match.AsPointer(),
         InternalMultiplayerStatusCallback,
         Callbacks.ToIntPtr(callback));
 }
Esempio 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)
         );
 }
Esempio 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));
 }
Esempio 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));
 }
Esempio n. 19
0
 protected override void CallDispose(HandleRef selfPointer)
 {
     TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_TurnBasedMatchesResponse_Dispose(SelfPtr());
 }
Esempio n. 20
0
 internal int CompletedMatchesCount()
 {
     return((int)TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_TurnBasedMatchesResponse_GetCompletedMatches_Length(this.SelfPtr()).ToUInt32());
 }
Esempio 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)))));
 }
Esempio 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)));
 }
Esempio n. 23
0
 internal void GetMatch(string matchId, Action <TurnBasedMatchResponse> callback)
 {
     TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_FetchMatch(mGameServices.AsHandle(),
                                                                        matchId, InternalTurnBasedMatchCallback,
                                                                        ToCallbackPointer(callback));
 }
Esempio 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)));
 }
Esempio 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));
 }
Esempio n. 26
0
 internal CommonErrorStatus.MultiplayerStatus Status()
 {
     return(TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_TurnBasedMatchesResponse_GetStatus(SelfPtr()));
 }
Esempio n. 27
0
 internal void ShowInboxUI(Action <MatchInboxUIResponse> callback)
 {
     TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_ShowMatchInboxUI(mGameServices.AsHandle(),
                                                                              InternalMatchInboxUICallback,
                                                                              Callbacks.ToIntPtr <MatchInboxUIResponse>(callback, MatchInboxUIResponse.FromPointer));
 }
Esempio n. 28
0
 protected override void CallDispose(HandleRef selfPointer)
 {
     TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_MatchInboxUIResponse_Dispose(selfPointer);
 }
Esempio n. 29
0
 internal CommonErrorStatus.UIStatus UiStatus()
 {
     return(TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_MatchInboxUIResponse_GetStatus(SelfPtr()));
 }
Esempio n. 30
0
 internal void DeclineInvitation(MultiplayerInvitation invitation)
 {
     TurnBasedMultiplayerManager.TurnBasedMultiplayerManager_DeclineInvitation(mGameServices.AsHandle(),
                                                                               invitation.AsPointer());
 }