internal void CreateMatch(TurnBasedMatchConfig config, Action <TurnBasedMatchResponse> callback) { C.TurnBasedMultiplayerManager_CreateTurnBasedMatch(mGameServices.AsHandle(), config.AsPointer(), InternalTurnBasedMatchCallback, ToCallbackPointer(callback)); }
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)); }
internal void GetAllTurnbasedMatches(Action <TurnBasedMatchesResponse> callback) { C.TurnBasedMultiplayerManager_FetchMatches(mGameServices.AsHandle(), InternalTurnBasedMatchesCallback, Callbacks.ToIntPtr <TurnBasedMatchesResponse>( callback, TurnBasedMatchesResponse.FromPointer)); }
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)); }
internal void CancelMatch(NativeTurnBasedMatch match, Action <MultiplayerStatus> callback) { C.TurnBasedMultiplayerManager_CancelMatch( mGameServices.AsHandle(), match.AsPointer(), InternalMultiplayerStatusCallback, Callbacks.ToIntPtr(callback)); }
internal void LeaveMatchDuringTheirTurn(NativeTurnBasedMatch match, Action <MultiplayerStatus> callback) { C.TurnBasedMultiplayerManager_LeaveMatchDuringTheirTurn( mGameServices.AsHandle(), match.AsPointer(), InternalMultiplayerStatusCallback, Callbacks.ToIntPtr(callback)); }
internal void ConfirmPendingCompletion(NativeTurnBasedMatch match, Action <TurnBasedMatchResponse> callback) { C.TurnBasedMultiplayerManager_ConfirmPendingCompletion( mGameServices.AsHandle(), match.AsPointer(), InternalTurnBasedMatchCallback, ToCallbackPointer(callback)); }
internal void Rematch(NativeTurnBasedMatch match, Action <TurnBasedMatchResponse> callback) { C.TurnBasedMultiplayerManager_Rematch( mGameServices.AsHandle(), match.AsPointer(), InternalTurnBasedMatchCallback, ToCallbackPointer(callback)); }
internal NativeTurnBasedMatch Match() { if (UiStatus() != CommonErrorStatus.UIStatus.VALID) { return(null); } return(new NativeTurnBasedMatch( C.TurnBasedMultiplayerManager_MatchInboxUIResponse_GetMatch(SelfPtr()))); }
internal NativeTurnBasedMatch Match() { if (!RequestSucceeded()) { return(null); } return(new NativeTurnBasedMatch( C.TurnBasedMultiplayerManager_TurnBasedMatchResponse_GetMatch(SelfPtr()))); }
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) ); }
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)); }
internal Status.MultiplayerStatus ResponseStatus() { return(C.TurnBasedMultiplayerManager_TurnBasedMatchResponse_GetStatus(SelfPtr())); }
internal void ShowInboxUI(Action <MatchInboxUIResponse> callback) { C.TurnBasedMultiplayerManager_ShowMatchInboxUI(mGameServices.AsHandle(), InternalMatchInboxUICallback, Callbacks.ToIntPtr <MatchInboxUIResponse>(callback, MatchInboxUIResponse.FromPointer)); }
internal void GetMatch(string matchId, Action <TurnBasedMatchResponse> callback) { C.TurnBasedMultiplayerManager_FetchMatch(mGameServices.AsHandle(), matchId, InternalTurnBasedMatchCallback, ToCallbackPointer(callback)); }
internal IEnumerable <MultiplayerInvitation> Invitations() { return(PInvokeUtilities.ToEnumerable( C.TurnBasedMultiplayerManager_TurnBasedMatchesResponse_GetInvitations_Length(SelfPtr()), index => new MultiplayerInvitation(C.TurnBasedMultiplayerManager_TurnBasedMatchesResponse_GetInvitations_GetElement(SelfPtr(), index)))); }
internal CommonErrorStatus.MultiplayerStatus Status() { return(C.TurnBasedMultiplayerManager_TurnBasedMatchesResponse_GetStatus(SelfPtr())); }
protected override void CallDispose(HandleRef selfPointer) { C.TurnBasedMultiplayerManager_TurnBasedMatchesResponse_Dispose(SelfPtr()); }
protected override void CallDispose(HandleRef selfPointer) { C.TurnBasedMultiplayerManager_MatchInboxUIResponse_Dispose(selfPointer); }
internal void DeclineInvitation(MultiplayerInvitation invitation) { C.TurnBasedMultiplayerManager_DeclineInvitation(mGameServices.AsHandle(), invitation.AsPointer()); }
internal CommonErrorStatus.UIStatus UiStatus() { return(C.TurnBasedMultiplayerManager_MatchInboxUIResponse_GetStatus(SelfPtr())); }