Example #1
0
    protected void MaxLv(Transform cell)
    {
        ButtonCustom component  = cell.FindChild("btnLvUp").GetComponent <ButtonCustom>();
        Image        component2 = cell.FindChild("imgMaterial").GetComponent <Image>();
        Text         component3 = cell.FindChild("texMaterial").GetComponent <Text>();

        component.get_gameObject().SetActive(false);
        component2.get_gameObject().SetActive(false);
        component3.get_gameObject().SetActive(false);
    }
Example #2
0
 private void OnClickSkillNotchBtn(GameObject go)
 {
     for (int i = 0; i < this.skillNotchBtnList.get_Count(); i++)
     {
         ButtonCustom buttonCustom = this.skillNotchBtnList.get_Item(i);
         if (go == buttonCustom.get_gameObject() && this.IsOpenSkillChangePanel)
         {
             int skillSlotNumByID = SkillUIManager.Instance.GetSkillSlotNumByID(this.currentSelectSkillID);
             if (skillSlotNumByID <= 0)
             {
                 return;
             }
             SkillUIManager.Instance.SendSkillConfigReq(skillSlotNumByID, i + 1, 1);
         }
     }
 }
    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);
    }