示例#1
0
 internal void CreateMatch(TurnBasedMatchConfig config,
                           Action <TurnBasedMatchResponse> callback)
 {
     C.TurnBasedMultiplayerManager_CreateTurnBasedMatch(mGameServices.AsHandle(),
                                                        config.AsPointer(), InternalTurnBasedMatchCallback,
                                                        ToCallbackPointer(callback));
 }
示例#2
0
 internal void ShowPlayerSelectUI(uint minimumPlayers, uint maxiumPlayers,
                                  bool allowAutomatching, Action <PlayerSelectUIResponse> callback)
 {
     C.TurnBasedMultiplayerManager_ShowPlayerSelectUI(mGameServices.AsHandle(), minimumPlayers,
                                                      maxiumPlayers, allowAutomatching, InternalPlayerSelectUIcallback,
                                                      Callbacks.ToIntPtr(callback, PlayerSelectUIResponse.FromPointer));
 }
示例#3
0
 internal void GetAllTurnbasedMatches(Action <TurnBasedMatchesResponse> callback)
 {
     C.TurnBasedMultiplayerManager_FetchMatches(mGameServices.AsHandle(),
                                                InternalTurnBasedMatchesCallback,
                                                Callbacks.ToIntPtr <TurnBasedMatchesResponse>(
                                                    callback, TurnBasedMatchesResponse.FromPointer));
 }
示例#4
0
 internal void AcceptInvitation(MultiplayerInvitation invitation,
                                Action <TurnBasedMatchResponse> callback)
 {
     Logger.d("Accepting invitation: " + invitation.AsPointer().ToInt64());
     C.TurnBasedMultiplayerManager_AcceptInvitation(mGameServices.AsHandle(),
                                                    invitation.AsPointer(), InternalTurnBasedMatchCallback, ToCallbackPointer(callback));
 }
示例#5
0
 internal void CancelMatch(NativeTurnBasedMatch match,
                           Action <MultiplayerStatus> callback)
 {
     C.TurnBasedMultiplayerManager_CancelMatch(
         mGameServices.AsHandle(),
         match.AsPointer(),
         InternalMultiplayerStatusCallback,
         Callbacks.ToIntPtr(callback));
 }
示例#6
0
 internal void LeaveMatchDuringTheirTurn(NativeTurnBasedMatch match,
                                         Action <MultiplayerStatus> callback)
 {
     C.TurnBasedMultiplayerManager_LeaveMatchDuringTheirTurn(
         mGameServices.AsHandle(),
         match.AsPointer(),
         InternalMultiplayerStatusCallback,
         Callbacks.ToIntPtr(callback));
 }
示例#7
0
 internal void ConfirmPendingCompletion(NativeTurnBasedMatch match,
                                        Action <TurnBasedMatchResponse> callback)
 {
     C.TurnBasedMultiplayerManager_ConfirmPendingCompletion(
         mGameServices.AsHandle(),
         match.AsPointer(),
         InternalTurnBasedMatchCallback,
         ToCallbackPointer(callback));
 }
示例#8
0
 internal void Rematch(NativeTurnBasedMatch match,
                       Action <TurnBasedMatchResponse> callback)
 {
     C.TurnBasedMultiplayerManager_Rematch(
         mGameServices.AsHandle(),
         match.AsPointer(),
         InternalTurnBasedMatchCallback,
         ToCallbackPointer(callback));
 }
示例#9
0
            internal NativeTurnBasedMatch Match()
            {
                if (UiStatus() != CommonErrorStatus.UIStatus.VALID)
                {
                    return(null);
                }

                return(new NativeTurnBasedMatch(
                           C.TurnBasedMultiplayerManager_MatchInboxUIResponse_GetMatch(SelfPtr())));
            }
示例#10
0
            internal NativeTurnBasedMatch Match()
            {
                if (!RequestSucceeded())
                {
                    return(null);
                }

                return(new NativeTurnBasedMatch(
                           C.TurnBasedMultiplayerManager_TurnBasedMatchResponse_GetMatch(SelfPtr())));
            }
示例#11
0
 internal void FinishMatchDuringMyTurn(NativeTurnBasedMatch match, byte[] data,
                                       ParticipantResults results, Action <TurnBasedMatchResponse> callback)
 {
     C.TurnBasedMultiplayerManager_FinishMatchDuringMyTurn(
         mGameServices.AsHandle(),
         match.AsPointer(),
         data,
         new UIntPtr((uint)data.Length),
         results.AsPointer(),
         InternalTurnBasedMatchCallback,
         ToCallbackPointer(callback)
         );
 }
示例#12
0
 internal void TakeTurn(NativeTurnBasedMatch match, byte[] data,
                        MultiplayerParticipant nextParticipant, Action <TurnBasedMatchResponse> callback)
 {
     C.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));
 }
示例#13
0
 internal Status.MultiplayerStatus ResponseStatus()
 {
     return(C.TurnBasedMultiplayerManager_TurnBasedMatchResponse_GetStatus(SelfPtr()));
 }
示例#14
0
 internal void ShowInboxUI(Action <MatchInboxUIResponse> callback)
 {
     C.TurnBasedMultiplayerManager_ShowMatchInboxUI(mGameServices.AsHandle(),
                                                    InternalMatchInboxUICallback,
                                                    Callbacks.ToIntPtr <MatchInboxUIResponse>(callback, MatchInboxUIResponse.FromPointer));
 }
示例#15
0
 internal void GetMatch(string matchId, Action <TurnBasedMatchResponse> callback)
 {
     C.TurnBasedMultiplayerManager_FetchMatch(mGameServices.AsHandle(),
                                              matchId, InternalTurnBasedMatchCallback,
                                              ToCallbackPointer(callback));
 }
示例#16
0
 internal IEnumerable <MultiplayerInvitation> Invitations()
 {
     return(PInvokeUtilities.ToEnumerable(
                C.TurnBasedMultiplayerManager_TurnBasedMatchesResponse_GetInvitations_Length(SelfPtr()),
                index => new MultiplayerInvitation(C.TurnBasedMultiplayerManager_TurnBasedMatchesResponse_GetInvitations_GetElement(SelfPtr(), index))));
 }
示例#17
0
 internal CommonErrorStatus.MultiplayerStatus Status()
 {
     return(C.TurnBasedMultiplayerManager_TurnBasedMatchesResponse_GetStatus(SelfPtr()));
 }
示例#18
0
 protected override void CallDispose(HandleRef selfPointer)
 {
     C.TurnBasedMultiplayerManager_TurnBasedMatchesResponse_Dispose(SelfPtr());
 }
示例#19
0
 protected override void CallDispose(HandleRef selfPointer)
 {
     C.TurnBasedMultiplayerManager_MatchInboxUIResponse_Dispose(selfPointer);
 }
示例#20
0
 internal void DeclineInvitation(MultiplayerInvitation invitation)
 {
     C.TurnBasedMultiplayerManager_DeclineInvitation(mGameServices.AsHandle(),
                                                     invitation.AsPointer());
 }
示例#21
0
 internal CommonErrorStatus.UIStatus UiStatus()
 {
     return(C.TurnBasedMultiplayerManager_MatchInboxUIResponse_GetStatus(SelfPtr()));
 }