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); }
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); }