Exemplo n.º 1
0
 public override void OnEnter()
 {
     ShowPlayerInfor();
     if (playerInfor != null)
     {
         EnterAnimation();
     }
     if (showList == null)
     {
         showList = GetComponent <ShowListRequest>();
     }
     showList.SendRequest();
 }
Exemplo n.º 2
0
 private void Start()
 {
     playerInfor    = transform.Find("PlayerInfor").GetComponent <RectTransform>();
     roomList       = transform.Find("RoomList").GetComponent <RectTransform>();
     layoutGroup    = transform.Find("RoomList/ScrollRect/RoomGroup").GetComponent <VerticalLayoutGroup>();
     roomItemPrefab = Resources.Load("UIPanel/RoomItem") as GameObject;
     transform.Find("RoomList/BackButton").GetComponent <Button>().onClick.AddListener(OnClickClose);
     transform.Find("PlayerInfor/CreatRoomButton").GetComponent <Button>().onClick.AddListener(OnClickCreatRoom);
     transform.Find("RoomList/RefreshButton").GetComponent <Button>().onClick.AddListener(OnClickRefresh);
     showList         = GetComponent <ShowListRequest>();
     creatRoomRequest = GetComponent <CreatRoomRequest>();
     joinRoomRequest  = GetComponent <JoinRoomRequest>();
     EnterAnimation();
     ShowPlayerInfor();
 }