Пример #1
0
    public void ShowInfoByPos(EPosType posType, int pos)
    {
        this.mPos     = pos;
        this.mPosType = posType;
        bool isDress = (posType == EPosType.RoleGem);

        ShowDress(isDress);
        XGem gem    = GTDataManager.Instance.GetGemDataByPos(posType, pos);
        int  itemID = gem.Id;
        DGem gemDB  = ReadCfgGem.GetDataById(itemID);

        gemLevel.text      = GTTools.Format("等级 {0}", gem.StrengthenLevel);
        gemFightValue.text = GTTools.Format("战斗力 {0}", AttrHelper.GetFightValue(gem));
        ShowBaseView(itemID);
        GTItemHelper.ShowGemPropertyText(gemPropertys, itemID, gem.StrengthenLevel);
        DGemSuit suitDB        = ReadCfgGemSuit.GetDataById(gemDB.Suit);
        int      activeSuitNum = isDress ? GemModule.Instance.GetActiveSameSuitsCountByPos(pos) : 0;
        bool     hasSuit       = ReadCfgGemSuit.ContainsKey(gemDB.Suit);

        if (hasSuit)
        {
            ShowHasSuit(gemDB);
            ShowSuitPropertysView(activeSuitNum, suitDB);
            ShowSameSuitGemsView(gemDB.Id);
        }
        else
        {
            ShowNoSuit();
        }
    }
Пример #2
0
    private void ShowHasSuit(DGem gemDB)
    {
        notSuit.SetActive(false);
        hasSuit.SetActive(true);
        transform.Find("Right/Grid").gameObject.SetActive(true);
        transform.Find("Right/Title").gameObject.SetActive(true);
        DGemSuit suitDB = ReadCfgGemSuit.GetDataById(gemDB.Suit);

        gemSuitName.text = suitDB.Name;
    }
Пример #3
0
 private void ShowSuitPropertysView(int activeSuitNum, DGemSuit suitDB)
 {
     gemSuitText.text = string.Empty;
     for (int i = 0; i < suitDB.SuitPropertys.Count; i++)
     {
         Dictionary <EAttr, int> propertys = suitDB.SuitPropertys[i];
         string s   = GTTools.Format(suitDB.SuitDesc, i + 2, propertys[EAttr.HP], propertys[EAttr.AP]);
         string str = string.Empty;
         if (activeSuitNum >= i + 2)
         {
             str = GTTools.Format("[00ff00]{0}[-]", s);
         }
         else
         {
             str = GTTools.Format("[777777]{0}[-]", s);
         }
         gemSuitText.Append(str);
     }
 }