Ejemplo n.º 1
0
 private void ResetChatsPos()
 {
     for (int i = 0; i < this.m_listChats.get_Count(); i++)
     {
         ChatInfoBase chatInfoBase = this.m_listChats.get_Item(i);
         chatInfoBase.get_transform().set_localPosition(new Vector3(0f, this.CalHeight4Chats(i), 0f));
     }
 }
Ejemplo n.º 2
0
    public void AddChat2Channel(ChatManager.ChatInfo chatInfo)
    {
        this.CheckNums();
        ChatInfoBase chatInfoBase = ChatManager.CreatePrefab2ChannelChatInfo("_ChatItem" + this.m_listChats.get_Count());

        UGUITools.ResetTransform(chatInfoBase.get_transform(), this.m_rChannelChatsOffset);
        chatInfoBase.get_transform().set_localPosition(new Vector3(0f, this.CalHeight4Chats(this.m_listChats.get_Count()), 0f));
        chatInfoBase.ShowInfo(chatInfo);
        this.m_listChats.Add(chatInfoBase);
        this.m_rChannelChats.set_sizeDelta(new Vector2(0f, Mathf.Abs(this.CalHeight4Chats(this.m_listChats.get_Count()))));
        this.SetContentPos();
        if (chatInfo.sender_uid == EntityWorld.Instance.EntSelf.ID)
        {
            this.OnBtnlockClick(null);
        }
        else if (this.Islock)
        {
            this.NewNum++;
            this.ShowLock(true);
        }
    }
Ejemplo n.º 3
0
    private static void CreatePools()
    {
        ChatManager.ChatInfoChannelPoolTransform = new GameObject("Pool2ChatChannel").get_transform();
        ChatManager.ChatInfoChannelPoolTransform.set_parent(UINodesManager.NoEventsUIRoot);
        UGUITools.ResetTransform(ChatManager.ChatInfoChannelPoolTransform);
        ChatManager.ChatInfoChannelPool      = new UIPool("ChatInfo2Channel", ChatManager.ChatInfoChannelPoolTransform, false);
        ChatManager.ChatInfoTipPoolTransform = new GameObject("Pool2ChatTip").get_transform();
        ChatManager.ChatInfoTipPoolTransform.set_parent(UINodesManager.NoEventsUIRoot);
        ChatManager.ChatInfoTipPoolTransform.get_gameObject().SetActive(false);
        UGUITools.ResetTransform(ChatManager.ChatInfoTipPoolTransform);
        ChatManager.ChatInfoTipPool = new UIPool("ChatInfo2Tip", ChatManager.ChatInfoTipPoolTransform, false);
        ChatInfoBase component = ResourceManager.GetInstantiate2Prefab("ChatInfo2Tip").GetComponent <ChatInfoBase>();

        component.set_name("FontTool");
        component.get_transform().SetParent(UINodesManager.T4RootOfSpecial);
        ChatManager.mFontTool = component.get_transform().FindChild("Content").GetComponent <Text>();
        component.get_gameObject().SetActive(false);
        ChatManager.FacePoolTransform = new GameObject("Pool2Face").get_transform();
        ChatManager.FacePoolTransform.set_parent(UINodesManager.NoEventsUIRoot);
        ChatManager.FacePoolTransform.get_gameObject().SetActive(false);
        UGUITools.ResetTransform(ChatManager.FacePoolTransform);
        ChatManager.FacePool = new UIPool("Item2Face", ChatManager.FacePoolTransform, false);
    }