Ejemplo n.º 1
0
    /// <summary>
    /// 链接位移 链接每次移动一行
    /// </summary>
    /// <param name="direction">方向</param>
    /// <param name="times">倍数</param>
    void MoveLinkPos(ChatHistoryItem history, EMOTIONLINK_MOVE_DIRECTION direction, float times)
    {
//        int nHeightMax = m_LabelChatDetailOthers.GetComponent<UIWidget>().height;
        for (int i = 0; i < m_LinkList.Count; ++i)
        {
            if (m_LinkList[i] != null)
            {
                m_LinkList[i].transform.localPosition += new Vector3(0, m_Space_Height * (int)direction * times, 0);
                m_LinkList[i].SetActive(true);
            }
        }
    }
Ejemplo n.º 2
0
 void MoveLableEmotionPos(ChatHistoryItem history, EMOTIONLINK_MOVE_DIRECTION direction, float times)
 {
     UISprite[] spriteArray = null;
     if (history.SenderGuid == Singleton <ObjManager> .GetInstance().MainPlayer.GUID)
     {
         spriteArray = m_LabelEmotionRootMe.GetComponentsInChildren <UISprite>();
     }
     else
     {
         spriteArray = m_LabelEmotionRootOthers.GetComponentsInChildren <UISprite>();
     }
     for (int i = 0; i < spriteArray.Length; i++)
     {
         spriteArray[i].gameObject.transform.localPosition += new Vector3(0, m_Space_Height * (int)direction * times, 0);
     }
 }