private static RealTimeEventListenerHelper HelperForSession(RoomSession session) { return(RealTimeEventListenerHelper.Create() .SetOnDataReceivedCallback((room, participant, data, isReliable) => session.OnDataReceived(room, participant, data, isReliable)) .SetOnParticipantStatusChangedCallback((room, participant) => session.OnParticipantStatusChanged(room, participant)) .SetOnRoomConnectedSetChangedCallback((room) => session.OnConnectedSetChanged(room)) .SetOnRoomStatusChangedCallback((room) => session.OnRoomStatusChanged(room))); }
private static GooglePlayGames.Native.PInvoke.RealTimeEventListenerHelper HelperForSession(RoomSession session) { return(GooglePlayGames.Native.PInvoke.RealTimeEventListenerHelper.Create().SetOnDataReceivedCallback(delegate(NativeRealTimeRoom room, GooglePlayGames.Native.PInvoke.MultiplayerParticipant participant, byte[] data, bool isReliable) { session.OnDataReceived(room, participant, data, isReliable); }).SetOnParticipantStatusChangedCallback(delegate(NativeRealTimeRoom room, GooglePlayGames.Native.PInvoke.MultiplayerParticipant participant) { session.OnParticipantStatusChanged(room, participant); }) .SetOnRoomConnectedSetChangedCallback(delegate(NativeRealTimeRoom room) { session.OnConnectedSetChanged(room); }) .SetOnRoomStatusChangedCallback(delegate(NativeRealTimeRoom room) { session.OnRoomStatusChanged(room); })); }