Exemplo n.º 1
0
    public override void OnResponse(string data)
    {
        if (data == "0")
        {
            roomListPanel.EmptyRoomItemOnMain();
            return;
        }
        List <UserData> userDatas = new List <UserData>();

        string[] userHosts = data.Split('|');
        foreach (string host in userHosts)
        {
            string[] strs = host.Split(',');
            userDatas.Add(new UserData(int.Parse(strs[0]), strs[1], int.Parse(strs[2]), int.Parse(strs[3])));
        }
        roomListPanel.LoadRoomItemAsync(userDatas);
    }