Beispiel #1
0
    public void SetGridInfo(GameCmd.enumProfession pro)
    {
        this.m_emPro = pro;
        if (null != m_spIcon)
        {
            if (m_spIcon.mSpriteCount == 2)
            {
                m_spIcon.mSpriteList = new string[2];

                string strIcon = ChooseRolePanel.GetSpriteName(pro);
                m_spIcon.mSpriteList[0] = strIcon;
                m_spIcon.mSpriteList[1] = strIcon + "_hui";
            }
        }
        SetSelect(false, false);
    }
Beispiel #2
0
    public void SetData(int index, GameCmd.SelectUserInfo info = null)
    {
        m_iIndex = index;
        m_uID    = (null != info) ? info.id : 0;
        m_info   = info;
        if (null != m_collider && m_collider.enabled == Empty)
        {
            m_collider.enabled = !Empty;
        }
        if (null != m_tsNone && null != m_tsNone.GetComponent <Collider>())
        {
            m_tsNone.GetComponent <Collider>().enabled = Empty;
        }
        //if (null != m_tsNone)
        //{
        //    if (m_tsNone.gameObject.activeSelf != Empty)
        //        m_tsNone.gameObject.SetActive(Empty);
        //    if (null != m_collider && m_collider.enabled)
        //    {
        //        m_collider.enabled = false;
        //    }
        //}
        if (m_labLeftTime != null)
        {
            if (info != null)
            {
                bool inDelete = info.del == 1;
                m_labLeftTime.gameObject.SetActive(inDelete);
                if (inDelete)
                {
                    m_labLeftTime.text = DataManager.Manager <TextManager>().GetLocalFormatText(LocalTextType.DeleteRole_Tips_5, GetTime(info.delleveltime));
                }
            }
        }
        if (null != m_tsCharacterInfo)
        {
            if (m_tsCharacterInfo.gameObject.activeSelf == Empty)
            {
                m_tsCharacterInfo.gameObject.SetActive(!Empty);
            }
            if (!Empty)
            {
                if (null != m_labLv)
                {
                    m_labLv.text = string.Format("{0}级", info.level);
                }

                if (null != m_labName)
                {
                    m_labName.text = info.name;
                }
                if (null != m_spCIcon)
                {
                    if (m_spCIcon.mSpriteCount == 2)
                    {
                        m_spCIcon.mSpriteList = new string[2];

                        string strIcon = ChooseRolePanel.GetSpriteName(info.type);
                        m_spCIcon.mSpriteList[0] = strIcon;
                        m_spCIcon.mSpriteList[1] = strIcon + "_hui";
                        m_spCIcon.Reset();
                    }
                }
            }
        }
        SetSelect(false, false);
    }