private void OnRoomUpdate(string data) { string[] storeData = data.Split(AndroidNative.DATA_SPLITTER [0]); _currentRoom = new GP_RTM_Room(); _currentRoom.id = storeData[0]; _currentRoom.creatorId = storeData[1]; string[] ParticipantsInfo = storeData[2].Split(","[0]); for (int i = 0; i < ParticipantsInfo.Length; i += 6) { if (ParticipantsInfo[i] == AndroidNative.DATA_EOF) { break; } GP_Participant p = new GP_Participant(ParticipantsInfo[i], ParticipantsInfo[i + 1], ParticipantsInfo[i + 2], ParticipantsInfo[i + 3], ParticipantsInfo[i + 4], ParticipantsInfo[i + 5]); _currentRoom.AddParticipant(p); } _currentRoom.status = (GP_RTM_RoomStatus)System.Convert.ToInt32(storeData[3]); _currentRoom.creationTimestamp = System.Convert.ToInt64(storeData[4]); Debug.Log("GooglePlayRTM OnRoomUpdate Room State: " + _currentRoom.status.ToString()); ActionRoomUpdated(_currentRoom); }
//-------------------------------------- // INITIALIZATION //-------------------------------------- void Awake() { DontDestroyOnLoad(gameObject); _currentRoom = new GP_RTM_Room(); Debug.Log("GooglePlayRTM Created"); }
private void OnRoomUpdate(string data) { string[] storeData = data.Split(AndroidNative.DATA_SPLITTER[0]); _currentRoom = new GP_RTM_Room { id = storeData[0], creatorId = storeData[1] }; var participantsInfo = storeData[2].Split(','); for (int i = 0; i < participantsInfo.Length; i += 6) { if (participantsInfo[i] == AndroidNative.DATA_EOF) { break; } var p = new GP_Participant(participantsInfo[i], participantsInfo[i + 1], participantsInfo[i + 2], participantsInfo[i + 3], participantsInfo[i + 4], participantsInfo[i + 5]); _currentRoom.AddParticipant(p); } _currentRoom.status = (GP_RTM_RoomStatus)Convert.ToInt32(storeData[3]); _currentRoom.creationTimestamp = Convert.ToInt64(storeData[4]); Debug.Log("GooglePlayRTM OnRoomUpdate Room State: " + _currentRoom.status); ActionRoomUpdated(_currentRoom); }
public UM_RTM_Room(GP_RTM_Room room) { foreach (GP_Participant p in room.participants) { UM_RTM_Participant participant = new UM_RTM_Participant(p); _Participants.Add(participant); } }
//-------------------------------------- // INITIALIZATION //-------------------------------------- void Awake() { DontDestroyOnLoad(gameObject); _currentRoom = new GP_RTM_Room(); GooglePlayInvitationManager.instance.Init(); Debug.Log("GooglePlayRTM Created"); }
private void OnLeftRoom(string data) { Debug.Log("OnLeftRoom Created OnRoomUpdate"); string[] storeData = data.Split(AndroidNative.DATA_SPLITTER [0]); GP_RTM_Result package = new GP_RTM_Result(storeData[0], storeData [1]); _currentRoom = new GP_RTM_Room(); ActionRoomUpdated(_currentRoom); ActionLeftRoom(package); }
//-------------------------------------- // INITIALIZATION //-------------------------------------- void Awake() { DontDestroyOnLoad(gameObject); _currentRoom = new GP_RTM_Room(); GooglePlayInvitationManager.ActionInvitationReceived += OnInvitationReceived; GooglePlayInvitationManager.ActionInvitationRemoved += OnInvitationRemoved; GooglePlayInvitationManager.ActionInvitationAccepted += OnInvitationAccepted; GooglePlayInvitationManager.Instance.Init(); Debug.Log("GooglePlayRTM Created"); }
private void HandleActionRoomUpdated(GP_RTM_Room room) { _CurrentRoom = new UM_RTM_Room(room); RoomUpdated(); }