Beispiel #1
0
 private void SetTexName(Text texName, int talentId, int talentLv)
 {
     if (talentLv == 0)
     {
         texName.set_text(PetEvoGlobal.GetName(talentId));
     }
     else
     {
         texName.set_text(string.Concat(new object[]
         {
             PetEvoGlobal.GetName(talentId),
             " (LV.",
             talentLv,
             ")"
         }));
     }
 }
Beispiel #2
0
    public void Init(int talentId)
    {
        int           skillLv          = PetEvoGlobal.GetSkillLv(PetBasicUIViewModel.PetID, talentId);
        int           num              = skillLv + 1;
        Text          component        = base.get_transform().FindChild("texName").GetComponent <Text>();
        Text          component2       = base.get_transform().FindChild("texLv").GetComponent <Text>();
        Text          component3       = base.get_transform().FindChild("texDesc").GetComponent <Text>();
        Text          component4       = base.get_transform().FindChild("texLvNext").GetComponent <Text>();
        Text          component5       = base.get_transform().FindChild("texDescNext").GetComponent <Text>();
        ChongWuTianFu chongWuTianFuRow = PetEvoGlobal.GetChongWuTianFuRow(talentId);
        int           describe         = chongWuTianFuRow.describe;
        string        chineseContent   = GameDataUtils.GetChineseContent(describe, false);
        string        rowId            = chongWuTianFuRow.lvRuleId + "_" + skillLv;
        List <float>  describeValue    = PetEvoGlobal.GetTianFuDengJiGuiZeRow(rowId).describeValue;

        component.set_text(PetEvoGlobal.GetName(talentId));
        component2.set_text("当前");
        if (describe != 0)
        {
            component3.set_text(this.ReplaceDesc(chineseContent, describeValue));
        }
        else
        {
            component3.set_text(string.Empty);
        }
        if (PetEvoGlobal.IsMaxSkillLv(talentId, skillLv))
        {
            component4.set_text("该技能已提升到满级");
            component5.set_text(string.Empty);
        }
        else
        {
            component4.set_text("下一级");
            string rowId2 = chongWuTianFuRow.lvRuleId + "_" + num;
            describeValue = PetEvoGlobal.GetTianFuDengJiGuiZeRow(rowId2).describeValue;
            if (describe != 0)
            {
                component5.set_text(this.ReplaceDesc(chineseContent, describeValue));
            }
            else
            {
                component5.set_text(string.Empty);
            }
        }
    }
    protected override void SetOneSkill(int cellIndex, int talentId, int talentLv, int nextTalentLv)
    {
        Transform    child      = base.get_transform().GetChild(cellIndex);
        Text         component  = child.FindChild("texName").GetComponent <Text>();
        Text         component2 = child.FindChild("texLv").GetComponent <Text>();
        Text         component3 = child.FindChild("texNeedLv").GetComponent <Text>();
        Text         component4 = child.FindChild("texDesc").GetComponent <Text>();
        Image        component5 = child.FindChild("imgNatural").GetComponent <Image>();
        Image        component6 = child.FindChild("imgMaterial").GetComponent <Image>();
        Text         component7 = child.FindChild("texMaterial").GetComponent <Text>();
        ButtonCustom component8 = child.FindChild("btnLvUp").GetComponent <ButtonCustom>();
        string       desc       = PetEvoGlobal.GetDesc(talentId);

        if (PetEvoGlobal.IsEnoughStar(PetBasicUIViewModel.PetID, talentId))
        {
            component.set_text(PetEvoGlobal.GetName(talentId));
            component4.set_text(desc);
            component4.set_color(new Color32(165, 90, 65, 255));
            ImageColorMgr.SetImageColor(component5, false);
        }
        else
        {
            string        text          = string.Empty;
            int           requireStar   = PetEvoGlobal.GetRequireStar(PetBasicUIViewModel.PetID, talentId);
            PetConversion petConversion = DataReader <PetConversion> .Get(requireStar);

            if (petConversion != null)
            {
                text = string.Format(GameDataUtils.GetChineseContent(400018, false), petConversion.tianfuSuffix);
                component.set_text(PetEvoGlobal.GetName(talentId) + text);
            }
            component4.set_text(TextColorMgr.FilterColor(desc));
            component4.set_color(Color.get_gray());
            ImageColorMgr.SetImageColor(component5, true);
        }
        component3.get_gameObject().SetActive(false);
        component2.get_gameObject().SetActive(false);
        component8.get_gameObject().SetActive(false);
        component6.get_gameObject().SetActive(false);
        component7.get_gameObject().SetActive(false);
    }
Beispiel #4
0
    protected override void SetOneSkill(int cellIndex, int talentId, int talentLv, int nextTalentLv)
    {
        Transform child = base.get_transform().GetChild(cellIndex);

        child.FindChild("texName").GetComponent <Text>().set_text(PetEvoGlobal.GetName(talentId));
        child.FindChild("texLv").GetComponent <Text>().set_text("Lv" + talentLv);
        if (PetEvoGlobal.GetOnePet(PetBasicUIViewModel.PetID) == null)
        {
            base.Locked(child, talentId);
        }
        else if (PetEvoGlobal.IsMaxSkillLv(talentId, talentLv))
        {
            base.MaxLv(child);
        }
        else if (PetEvoGlobal.IsSkillCanLvUp(PetBasicUIViewModel.PetID, talentId, nextTalentLv))
        {
            base.CanLvUp(child, talentId, nextTalentLv);
        }
        else
        {
            base.CanNotLvUp(child, talentId, nextTalentLv);
        }
        this.SetSkillDesc(cellIndex, talentId);
    }