internal void AcceptInvitation(MultiplayerInvitation invitation, RealTimeEventListenerHelper listener, Action <RealTimeRoomResponse> callback) { C.RealTimeMultiplayerManager_AcceptInvitation(mGameServices.AsHandle(), invitation.AsPointer(), listener.AsPointer(), InternalRealTimeRoomCallback, ToCallbackPointer(callback)); }
internal void CreateRoom(RealtimeRoomConfig config, RealTimeEventListenerHelper helper, Action<RealTimeRoomResponse> callback) { C.RealTimeMultiplayerManager_CreateRealTimeRoom(mGameServices.AsHandle(), config.AsPointer(), helper.AsPointer(), InternalRealTimeRoomCallback, ToCallbackPointer(callback)); }
internal void CreateRoom(RealtimeRoomConfig config, RealTimeEventListenerHelper helper, Action <RealTimeRoomResponse> callback) { C.RealTimeMultiplayerManager_CreateRealTimeRoom(mGameServices.AsHandle(), config.AsPointer(), helper.AsPointer(), InternalRealTimeRoomCallback, ToCallbackPointer(callback)); }
internal void AcceptInvitation(MultiplayerInvitation invitation, RealTimeEventListenerHelper listener, Action<RealTimeRoomResponse> callback) { C.RealTimeMultiplayerManager_AcceptInvitation(mGameServices.AsHandle(), invitation.AsPointer(), listener.AsPointer(), InternalRealTimeRoomCallback, ToCallbackPointer(callback)); }
internal RealTimeEventListenerHelper SetOnRoomConnectedSetChangedCallback(Action <NativeRealTimeRoom> callback) { GooglePlayGames.Native.Cwrapper.RealTimeEventListenerHelper.RealTimeEventListenerHelper_SetOnRoomConnectedSetChangedCallback(this.SelfPtr(), new GooglePlayGames.Native.Cwrapper.RealTimeEventListenerHelper.OnRoomConnectedSetChangedCallback(RealTimeEventListenerHelper.InternalOnRoomConnectedSetChangedCallback), RealTimeEventListenerHelper.ToCallbackPointer(callback)); return(this); }
internal static void InternalOnParticipantStatusChangedCallback(IntPtr room, IntPtr participant, IntPtr data) { RealTimeEventListenerHelper.PerformRoomAndParticipantCallback(nameof(InternalOnParticipantStatusChangedCallback), room, participant, data); }
public void CreateQuickGame(uint minOpponents, uint maxOpponents, uint variant, ulong exclusiveBitMask, RealTimeMultiplayerListener listener) { lock (mSessionLock) { RoomSession newSession = new RoomSession(mRealtimeManager, listener); if (mCurrentSession.IsActive()) { Logger.e("Received attempt to create a new room without cleaning up the old one."); newSession.LeaveRoom(); } else { mCurrentSession = newSession; Logger.d("QuickGame: Setting MinPlayersToStart = " + minOpponents); mCurrentSession.MinPlayersToStart = minOpponents; using (RealtimeRoomConfigBuilder realtimeRoomConfigBuilder = RealtimeRoomConfigBuilder.Create()) { RealtimeRoomConfig config = realtimeRoomConfigBuilder.SetMinimumAutomatchingPlayers(minOpponents).SetMaximumAutomatchingPlayers(maxOpponents).SetVariant(variant) .SetExclusiveBitMask(exclusiveBitMask) .Build(); using (config) { GooglePlayGames.Native.PInvoke.RealTimeEventListenerHelper helper = HelperForSession(newSession); try { newSession.StartRoomCreation(mNativeClient.GetUserId(), delegate { mRealtimeManager.CreateRoom(config, helper, newSession.HandleRoomResponse); }); } finally { if (helper != null) { ((IDisposable)helper).Dispose(); } } } } } } }
public void AcceptFromInbox(RealTimeMultiplayerListener listener) { lock (mSessionLock) { RoomSession newRoom = new RoomSession(mRealtimeManager, listener); if (mCurrentSession.IsActive()) { Logger.e("Received attempt to accept invitation without cleaning up active session."); newRoom.LeaveRoom(); } else { mCurrentSession = newRoom; mCurrentSession.ShowingUI = true; mRealtimeManager.ShowRoomInboxUI(delegate(RealtimeManager.RoomInboxUIResponse response) { mCurrentSession.ShowingUI = false; if (response.ResponseStatus() != CommonErrorStatus.UIStatus.VALID) { Logger.d("User did not complete invitation screen."); newRoom.LeaveRoom(); } else { GooglePlayGames.Native.PInvoke.MultiplayerInvitation invitation = response.Invitation(); GooglePlayGames.Native.PInvoke.RealTimeEventListenerHelper helper = HelperForSession(newRoom); try { Logger.d("About to accept invitation " + invitation.Id()); newRoom.StartRoomCreation(mNativeClient.GetUserId(), delegate { mRealtimeManager.AcceptInvitation(invitation, helper, delegate(RealtimeManager.RealTimeRoomResponse acceptResponse) { using (invitation) { newRoom.HandleRoomResponse(acceptResponse); newRoom.SetInvitation(invitation.AsInvitation()); } }); }); } finally { if (helper != null) { ((IDisposable)helper).Dispose(); } } } }); } } }
internal static RealTimeEventListenerHelper Create() => new RealTimeEventListenerHelper(RealTimeEventListenerHelper.RealTimeEventListenerHelper_Construct());
protected override void CallDispose(HandleRef selfPointer) { RealTimeEventListenerHelper.RealTimeEventListenerHelper_Dispose(selfPointer); }
internal void AcceptInvitation(MultiplayerInvitation invitation, RealTimeEventListenerHelper listener, Action <RealTimeRoomResponse> callback) { if (< > f__mg$cacheA == null) {