Esempio n. 1
0
 private void AddChatRecord(ChatLabelItem item)
 {
     if (ChatRecordList.Count >= 100)
     {
         ChatRecordList[0].DestroySelf();
         ChatRecordList.RemoveAt(0);
     }
     ChatRecordList.Add(item);
 }
Esempio n. 2
0
        public void CreateChatItem(int actorID, bool isMyChat, string str)
        {
            this.m_talkerActorID = actorID;
            GameObject    item          = (GameObject)Instantiate(ChatLabelItem.gameObject);
            ChatLabelItem chatLabelItem = item.GetComponent <ChatLabelItem>();

            chatLabelItem.Init(isMyChat, str);
            AddChatRecord(chatLabelItem);
            item.transform.parent        = Table.transform;
            item.transform.localPosition = Vector3.zero;
            item.transform.localScale    = Vector3.one;
            Table.Reposition();

            if (DraggablePanel.panel.enabled)
            {
                StartCoroutine("SetDragAmount");
            }
        }