Exemple #1
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);
    }
Exemple #2
0
 private static bool IsOneSkillCanLvUp(int petId, int talentId, int talentLv, int nextTalentLv)
 {
     return(!PetEvoGlobal.IsMaxSkillLv(talentId, talentLv) && PetEvoGlobal.IsSkillCanLvUp(petId, talentId, nextTalentLv) && PetManager.Instance.GetSkillPoint() > 0);
 }