Ejemplo n.º 1
0
    ///<初始化一个ITEM如果不够长往上加
    void _MakedGridItem(int idx, COM_ChatInfo p)
    {
        //Transform tf = _Grid.GetChild(idx);
        Transform tf = cGrid.GetChild(idx);

        if (p.teamId_ != 0)
        {
            if (!IsTeamLevelChannel(p) && isShowTeamLevel)
            {
                if (tf == null)
                {
                    return;
                }
                _Free(tf.gameObject);
                return;
            }
        }

        if (null == tf)
        {
            tf = _Alloc().transform;
            cGrid.AddChild(tf);
            //_Grid.AddChild(tf);
            tf.localPosition = Vector3.zero;
            tf.localScale    = Vector3.one;
        }
        tf.gameObject.SetActive(true);
        ChatMinCell cmi = tf.GetComponentInChildren <ChatMinCell>();

        cmi.Info = p;
    }
Ejemplo n.º 2
0
 public void closeAudio()
 {
     foreach (Transform tr in _Grid.transform)
     {
         ChatMinCell catc = tr.GetComponent <ChatMinCell>();
         catc.closeVecUI();
         //AudioSource cmc = tr.GetComponent<AudioSource>();
         //cmc.Stop();
     }
 }