hch
3 天以前 f2c78eecd49edc328225b77492e7f45e157bad02
Main/System/SkillUI/SkillBaseCell.cs
@@ -45,6 +45,20 @@
        }
    }
    Image m_WordBG;
    Image wordBG
    {
        get
        {
            if (m_WordBG == null)
            {
                m_WordBG = this.transform.GetComponent<Image>("Container_SkillCell/Image");
            }
            return m_WordBG;
        }
    }
    void Awake()
    {
        LoadPrefab();
@@ -52,6 +66,7 @@
    public void Init(int skillID, UnityAction onclick = null, bool showType = false)
    {
        LoadPrefab();   //存在被卸载的可能,重新加载
        var config = SkillConfig.Get(skillID);
        if (config == null)
        {
@@ -75,10 +90,12 @@
        if (showType)
        {
            skillType.text = Language.Get(config.FuncType == 1 ? "HeroSkillType_1" : "HeroSkillType_2");
            wordBG.SetActive(true);
        }
        else
        {
        {
            skillType.text = string.Empty;
            wordBG.SetActive(false);
        }
    }