Example #1
0
 public void UpdateRoomStandUp(uint roomid, Msg.ListRoomPlayerInfo player)
 {
     if (RoomIDs.BinarySearch(roomid) == 0)
     {
         Transform RoomInfo = Canvas.transform.Find("RoomList/Viewport/Content/" + roomid.ToString());
         Destroy(RoomInfo.Find("Player/" + player.SeatId + "/Avatar").gameObject);
     }
 }
Example #2
0
    public void UpdateRoomSitDown(uint roomid, Msg.ListRoomPlayerInfo player)
    {
        if (RoomIDs.BinarySearch(roomid) == 0)
        {
            Transform RoomInfo = Canvas.transform.Find("RoomList/Viewport/Content/" + roomid.ToString());

            UICircle avatar = (UICircle)Instantiate(PrefabAvatar);
            avatar.transform.SetParent(RoomInfo.Find("Player/" + player.SeatId + "/Avatar" + player.SeatId));
            avatar.transform.localPosition = new Vector3();
            avatar.GetComponent <RectTransform> ().sizeDelta = new Vector2(56, 56);
            StartCoroutine(Common.Load(avatar, player.Avatar));
        }
    }