Ejemplo n.º 1
0
    //更新头像的BUFF位
    public void UpdateBuffIcon()
    {
        for (int i = 0; i < (int)BUFFICON.MAX_BUFFICONUM; i++)
        {
            m_BuffShowIcon[i].gameObject.SetActive(false);
            m_BuffCDIcon[i].gameObject.SetActive(false);
        }

        int nBuffShowIndex = 0;

        for (int i = 0; i < GameManager.gameManager.PlayerDataPool.ClientImpactInfo.Count; ++i)
        {
            if (GameManager.gameManager.PlayerDataPool.ClientImpactInfo[i].IsVaild())
            {
                Tab_Impact _tabImpact = TableManager.GetImpactByID(GameManager.gameManager.PlayerDataPool.ClientImpactInfo[i].ImpactId, 0);
                if (_tabImpact != null)
                {
                    if (_tabImpact.BuffType == (int)BUFFTYPE.BUFF && _tabImpact.BuffIcon != "-1")
                    {
                        if (nBuffShowIndex >= 0 && nBuffShowIndex < (int)BUFFICON.MAX_BUFFICONUM)
                        {
                            m_BuffShowIcon[nBuffShowIndex].gameObject.SetActive(true);
                            m_BuffShowIcon[nBuffShowIndex].spriteName = _tabImpact.BuffIcon;
                            m_BuffShowIcon [nBuffShowIndex].MakePixelPerfect();
                            nBuffShowIndex++;
                        }
                        else
                        {
                            break;
                        }
                    }
                }
            }
        }
    }
Ejemplo n.º 2
0
    public void ShowTargetDebuffLogo(IList <int> debuffids)
    {
        if (m_BuffShowIcon != null && m_BuffShowIcon.Length == (int)Games.ImpactModle.BUFFICON.MAX_BUFFICONUM && debuffids != null)
        {
            for (int i = 0; i < (int)Games.ImpactModle.BUFFICON.MAX_BUFFICONUM; i++)
            {
                if (m_BuffShowIcon[i] != null)
                {
                    m_BuffShowIcon[i].gameObject.SetActive(false);
                }
            }

            int nBuffShowIndex = 0;
            int count          = debuffids.Count;
            for (int i = 0; i < count; ++i)
            {
                Tab_Impact _tabImpact = TableManager.GetImpactByID(debuffids[i], 0);
                if (_tabImpact != null)
                {
                    if (_tabImpact.BuffType == (int)Games.ImpactModle.BUFFTYPE.DEBUFF && _tabImpact.BuffIcon != "-1")
                    {
                        if (nBuffShowIndex >= 0 && nBuffShowIndex < (int)Games.ImpactModle.BUFFICON.MAX_BUFFICONUM)
                        {
                            if (m_BuffShowIcon[nBuffShowIndex] != null)
                            {
                                m_BuffShowIcon[nBuffShowIndex].gameObject.SetActive(true);
                                m_BuffShowIcon[nBuffShowIndex].spriteName = _tabImpact.BuffIcon;
                                m_BuffShowIcon[nBuffShowIndex].MakePixelPerfect();
                                nBuffShowIndex++;
                            }
                        }
                        else
                        {
                            break;
                        }
                    }
                }
            }
        }
    }