예제 #1
0
        private void BackMemberList(object msg)
        {
            Dictionary <string, object> dic = (Dictionary <string, object>)msg;
            object        obj  = dic["memberList"];
            List <object> list = (List <object>)obj;

            if (TeaMemberNum)
            {
                TeaMemberNum.gameObject.SetActive(true);
                var str = string.Format("茶馆人数:{0}", list.Count);
                TeaMemberNum.TrySetComponentValue(str);
            }
            foreach (object o in list)
            {
                Dictionary <string, object> dic2 = (Dictionary <string, object>)o;
                dic2["hasSend"] = HasSend;
                GameObject item = Instantiate(InfoItemHasIn);
                item.transform.parent = grid.transform;
                item.SetActive(true);
                item.transform.localScale = Vector3.one;
                TeaPowerItem powerItem = item.GetComponent <TeaPowerItem>();
                powerItem.UpdateView(dic2);
            }
            grid.Reposition();
            if (ScrollView != null)
            {
                ScrollView.ResetPosition();
            }
        }
예제 #2
0
        private void BackMemberList(object msg)
        {
            Dictionary <string, object> dic = (Dictionary <string, object>)msg;
            object        obj  = dic["memberList"];
            List <object> list = (List <object>)obj;

            foreach (object o in list)
            {
                Dictionary <string, object> dic2 = (Dictionary <string, object>)o;
                GameObject item = Instantiate(InfoItemHasIn);
                item.transform.parent = grid.transform;
                item.SetActive(true);
                item.transform.localScale = Vector3.one;
                TeaPowerItem powerItem = item.GetComponent <TeaPowerItem>();
                powerItem.UpdateView(dic2);
            }
            grid.Reposition();
        }