Пример #1
0
    private void RefreshAllSkillData()
    {
        List <JiNengJieSuoBiao> skillUnlockCfgList = SkillUIManager.Instance.GetSkillUnlockCfgData();

        if (skillUnlockCfgList == null)
        {
            return;
        }
        this.pool.Create(skillUnlockCfgList.get_Count(), delegate(int index)
        {
            if (index < skillUnlockCfgList.get_Count())
            {
                SkillBtnItem component = this.pool.Items.get_Item(index).GetComponent <SkillBtnItem>();
                if (component != null)
                {
                    component.UpdateSkillItem(skillUnlockCfgList.get_Item(index));
                    this.pool.Items.get_Item(index).get_transform().FindChild("ScaleRoot").GetComponent <ButtonCustom>().onClickCustom = new ButtonCustom.VoidDelegateObj(this.OnClickSelectSkillItem);
                    if ((this.currentSelectSkillID > 0 && skillUnlockCfgList.get_Item(index).skillId == this.currentSelectSkillID) || (this.currentSelectSkillID <= 0 && index == 0))
                    {
                        this.RefreshSelectSkillItemData(component);
                    }
                }
                if (index == skillUnlockCfgList.get_Count() - 1)
                {
                    this.PlayUnlockSkillFX();
                }
            }
        });
    }
Пример #2
0
    private void OnClickSelectSkillItem(GameObject go)
    {
        if (go != null && go.get_transform().get_parent().GetComponent <SkillBtnItem>() != null)
        {
            SkillBtnItem component = go.get_transform().get_parent().GetComponent <SkillBtnItem>();
            if (!SkillUIManager.Instance.CheckSkillIsUnLock(component.SkillUnLockCfgData.skillId))
            {
                string text  = string.Empty;
                string text2 = string.Empty;
                int    skillUnlockArtifactID = SkillUIManager.Instance.GetSkillUnlockArtifactID(component.SkillUnLockCfgData.skillId);
                if (skillUnlockArtifactID > 0)
                {
                    Artifact artifact = DataReader <Artifact> .Get(skillUnlockArtifactID);

                    if (artifact != null)
                    {
                        text = GameDataUtils.GetChineseContent(artifact.name, false);
                    }
                    Skill skill = DataReader <Skill> .Get(component.SkillUnLockCfgData.skillId);

                    if (skill != null)
                    {
                        text2 = GameDataUtils.GetChineseContent(skill.name, false);
                    }
                    string text3 = string.Format(GameDataUtils.GetChineseContent(518004, false), text, text2);
                    UIManagerControl.Instance.ShowToastText(text3);
                }
            }
            this.currentSelectRuneStoneID = 0;
            this.RefreshSelectSkillItemData(component);
        }
    }
Пример #3
0
 private void PlayUnlockSkillFX()
 {
     if (SkillUIManager.Instance.NewOpenSkillIDs != null)
     {
         for (int i = 0; i < SkillUIManager.Instance.NewOpenSkillIDs.get_Count(); i++)
         {
             int unlockSkillId = SkillUIManager.Instance.NewOpenSkillIDs.get_Item(i);
             for (int j = 0; j < this.pool.Items.get_Count(); j++)
             {
                 SkillBtnItem component = this.pool.Items.get_Item(j).GetComponent <SkillBtnItem>();
                 component.PlayUnlockFxID(unlockSkillId);
             }
         }
         SkillUIManager.Instance.NewOpenSkillIDs.Clear();
     }
 }
Пример #4
0
    private void RefreshSelectSkillItemData(SkillBtnItem skillBtnItem)
    {
        if (skillBtnItem == null)
        {
            return;
        }
        this.lastSelectSkillBtnItem = this.currentSelectSkillBtnItem;
        if (this.lastSelectSkillBtnItem != null)
        {
            this.lastSelectSkillBtnItem.Selected = false;
        }
        this.currentSelectSkillBtnItem          = skillBtnItem;
        this.currentSelectSkillBtnItem.Selected = true;
        this.currentSelectSkillID = this.currentSelectSkillBtnItem.SkillUnLockCfgData.skillId;
        this.RefreshSelectSkillDesc(this.currentSelectSkillID);
        this.RefreshRuneStoneDataBySkillID(this.currentSelectSkillID);
        bool flag = SkillUIManager.Instance.CheckSkillIsUnLock(this.currentSelectSkillID);

        if (this.isFirstOperate)
        {
            this.isFirstOperate = false;
            bool flag2 = SkillRuneManager.Instance.CheckHaveUnLockRuneStonBySkillID(this.currentSelectSkillID);
            if (!flag2)
            {
                this.IsOpenSkillChangePanel = true;
                this.SkillPanelMoveOnPath(this.IsOpenSkillChangePanel);
                this.runeUpgradePanelTrans.get_gameObject().SetActive(!this.IsOpenSkillChangePanel);
            }
            else if (flag2)
            {
                this.IsOpenSkillChangePanel = false;
                this.SkillPanelMoveOnPath(this.IsOpenSkillChangePanel);
                this.runeUpgradePanelTrans.get_gameObject().SetActive(!this.IsOpenSkillChangePanel);
            }
        }
        this.RemoveChangeSkillPanelAnim();
        if (flag && this.IsOpenSkillChangePanel && !SkillUIManager.Instance.CheckSkillIsEmbedNotch(this.currentSelectSkillID))
        {
            this.PlayChangeSkillPanelAnim();
        }
    }