Пример #1
0
 // 退出按钮
 public void logoutBtnClick()
 {
     mainHandle = new MainHandle();
     UserManager.logout();
     mainHandle.roomList((error, result) =>
     {
     });
     NetCore.Instance.Close();
     Application.LoadLevel("login");
 }
    // Use this for initialization
    void Start()
    {
        registHandle();

        mainHandle.roomList((error, result) =>
        {
            if (error == null)
            {
                for (int i = 0; i < result.list.Count; i++)
                {
                    Room room = result.list[i];
                    GameObject.Find("Button-" + (i + 1) + "/Max").GetComponent <Text>().text   = room.max_carry.ToString();
                    GameObject.Find("Button-" + (i + 1) + "/Blind").GetComponent <Text>().text = room.small_blind.ToString() + "/" + room.big_blind.ToString();
                    GameObject.Find("Button-" + (i + 1)).GetComponent <Button>().onClick.AddListener(() =>
                    {
                        toRoom(room.id);
                    });
                }
            }
        });
    }