public void DoHandle(byte[] data) { BaseResponseData baseResponseData = Utils.ToObjectFromBytes <BaseResponseData>(data); ListRoomsPanel listRoomsPanel = HGL_WindowManager.I.GetWindow("ListRoomsPanel").GetComponent <ListRoomsPanel>(); listRoomsPanel.Init(Utils.ToObjectFromBytes <List <Room> >((byte[])baseResponseData.GetValue("Rooms"))); HGL_WindowManager.I.OpenWindow(null, null, "ListRoomsPanel", false, true); Debug.Log(string.Format("Response, request type: {0}, result: {1}", baseResponseData.Request, baseResponseData.Result)); }
public void DoHandle(byte[] data) { BaseResponseData baseResponseData = Utils.ToObjectFromBytes <BaseResponseData>(data); string nickname = Convert.ToString(baseResponseData.GetValue("Nickname")); if (!nickname.Equals(SuperChat.I.Client.Nickname)) { GUIManager.I.DrawMessage(new Message(MessageLevel.Info, string.Format("{0} was entered in room", nickname))); } Debug.Log(string.Format("Response, request type: {0}, result: {1}", baseResponseData.Request, baseResponseData.Result)); }