| | |
| | | protected override void OnPreOpen() |
| | | { |
| | | FlagBit = 0; |
| | | // PlayerMountDatas.Event_MountSkillRefresh += MountSkillRefresh; |
| | | // PlayerMountDatas.Event_MountSkillRefresh += MountSkillRefresh; |
| | | _FlipScroll.OnRefreshData += OnRefreshActSkill; |
| | | _FlipScroll.OnTweenCompt += OnTweenCompt; |
| | | _dicHorse = horsemodel._DicHorse; |
| | |
| | | { |
| | | _FlipScroll.OnRefreshData -= OnRefreshActSkill; |
| | | _FlipScroll.OnTweenCompt -= OnTweenCompt; |
| | | // PlayerMountDatas.Event_MountSkillRefresh -= MountSkillRefresh; |
| | | // PlayerMountDatas.Event_MountSkillRefresh -= MountSkillRefresh; |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | |
| | | if (_GetMountSkills.ContainsKey(_MountList[Index]))//解锁 |
| | | { |
| | | _MountSkill.Lock.SetActive(false); |
| | | // _MountSkill.MountNameTxt1.text = HorseConfig.Get(_MountSkillDic[(_MountList[Index])].HorseID).Name; |
| | | // _MountSkill.MountNameTxt1.text = HorseConfig.Get(_MountSkillDic[(_MountList[Index])].HorseID).Name; |
| | | _MountSkill.SkillTex.material = MaterialUtility.GetUIDefaultGraphicMaterial();//亮 |
| | | } |
| | | else//未解锁 |
| | | { |
| | | // _MountSkill.MountNameTxt1.text = HorseConfig.Get(_MountSkillDic[(_MountList[Index])].HorseID).Name; |
| | | // _MountSkill.MountNameTxt1.text = HorseConfig.Get(_MountSkillDic[(_MountList[Index])].HorseID).Name; |
| | | _MountSkill.Lock.SetActive(false); |
| | | } |
| | | |
| | |
| | | else |
| | | HouseID = 0; |
| | | SkillIDNow = _MountList[Index]; |
| | | // _MountSkill.Select.SetActive(true); |
| | | // _MountSkill.Select.SetActive(true); |
| | | if (_GetMountSkills.ContainsKey(_MountList[Index])) |
| | | SkillsToUnlock(_MountList[Index]);//获得解锁技能 |
| | | else |
| | |
| | | } |
| | | else |
| | | { |
| | | // _MountSkill.Select.SetActive(false); |
| | | // _MountSkill.Select.SetActive(false); |
| | | } |
| | | } |
| | | else |
| | |
| | | |
| | | void UnunlockedState(MountSkill _mountSkill, int SkillID)// |
| | | { |
| | | var skillconfig = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, 1); |
| | | string _skillIcon = skillconfig.IconName; |
| | | var config = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, 1); |
| | | string _skillIcon = config.IconName; |
| | | _mountSkill.SkillTex.SetSprite(_skillIcon); |
| | | _mountSkill.SkillTex.material = MaterialUtility.GetDefaultSpriteGrayMaterial();//灰 |
| | | _mountSkill.Lock.SetActive(true); |
| | | _mountSkill.SkillNameTxt.text = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, 1).SkillName; |
| | | // _mountSkill.MountNameTxt1.text = "<color=#ff2828>" + HorseConfig.Get(_MountSkillDic[SkillID].HorseID).Name + "</color>"; |
| | | _mountSkill.SkillNameTxt.text = config.SkillName; |
| | | } |
| | | |
| | | void Consumables(int SkillID) |
| | | { |
| | | |
| | | int ItemID = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, 1).ExAttr4; |
| | | var config = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, 1); |
| | | int ItemID = config != null ? config.ExAttr4 : 0; |
| | | ItemConfig _Item = ItemConfig.Get(ItemID); |
| | | _ConsumptionGoods.SetSprite(_Item.IconKey); |
| | | _ConsumptionGoodButton.RemoveAllListeners(); |
| | |
| | | { |
| | | ItemAttrData attrData = new ItemAttrData(_Item.ID); |
| | | itemTipsModel.SetItemTipsModel(attrData); |
| | | |
| | | }); |
| | | |
| | | int Number = playerPack.GetItemCountByID(PackType.rptItem, ItemID); |
| | | Quantity = Number;//获取所需消耗品数量 |
| | | if (Number != 0) |
| | | { |
| | | string StrNum = Number.ToString() + "/" + SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, 1).ExAttr5; |
| | | var StrNum = StringUtility.Contact(Number, "/", config != null ? config.ExAttr5 : 0); |
| | | _StageTxt.text = UIHelper.AppendStringColor(0, StrNum); |
| | | } |
| | | else |
| | | { |
| | | string StrNum = " <color=#ff2828>" + Number.ToString() + "</color>" + UIHelper.AppendStringColor(0, "/" + (SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, 1).ExAttr5).ToString()); |
| | | |
| | | string StrNum = " <color=#ff2828>" + Number + "</color>" + UIHelper.AppendStringColor(0, "/" + (config != null ? config.ExAttr5 : 0)); |
| | | _StageTxt.text = StrNum; |
| | | } |
| | | } |
| | | |
| | | void UnlockingPanel(int SkillID)//未解锁面板 |
| | | { |
| | | string _skillIcon = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, 1).IconName; |
| | | _SkillImg.SetSprite(_skillIcon); |
| | | _skillName.text = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, 1).SkillName; |
| | | _UnlockDescribeBG.SetActive(false); |
| | | _LockedDescribeBG.SetActive(true); |
| | | _Impact1TxtA.text = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, 1).Description; |
| | | _LevelNumber.text = "0/3"; |
| | | var config = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, 1); |
| | | if (config != null) |
| | | { |
| | | _SkillImg.SetSprite(config.IconName); |
| | | _skillName.text = config.SkillName; |
| | | _UnlockDescribeBG.SetActive(false); |
| | | _LockedDescribeBG.SetActive(true); |
| | | _Impact1TxtA.text = config.Description; |
| | | _LevelNumber.text = "0/3"; |
| | | } |
| | | } |
| | | |
| | | void SkillsToUnlock(int SkillID)//获得技能解锁技能 |
| | | { |
| | | string _skillIcon = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, 1).IconName; |
| | | _SkillImg.SetSprite(_skillIcon); |
| | | _skillName.text = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, 1).SkillName; |
| | | var configLevel1 = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, 1); |
| | | if (configLevel1 != null) |
| | | { |
| | | _SkillImg.SetSprite(configLevel1.IconName); |
| | | _skillName.text = configLevel1.SkillName; |
| | | } |
| | | |
| | | _UnlockDescribeBG.SetActive(true); |
| | | _LockedDescribeBG.SetActive(false); |
| | | int SkillLV = _GetMountSkills[SkillID];//获取技能等级 |
| | | |
| | | if (SkillLV >= 3) |
| | | { |
| | | _Impact1Txt.text = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, 3).Description; |
| | | var configLevel3 = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, 3); |
| | | _Impact1Txt.text = configLevel3 != null ? configLevel3.Description : ""; |
| | | _ImpactsTxt.SetActive(false); |
| | | } |
| | | else |
| | | { |
| | | _ImpactsTxt.SetActive(true); |
| | | _Impact1Txt.text = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, SkillLV).Description; |
| | | _Impact2Txt.text = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, SkillLV + 1).Description; |
| | | var configNow = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, SkillLV); |
| | | var configNext = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, SkillLV + 1); |
| | | _Impact1Txt.text = configNow != null ? configNow.Description : ""; |
| | | _Impact2Txt.text = configNext != null ? configNext.Description : ""; |
| | | } |
| | | _LevelNumber.text = SkillLV.ToString() + "/3"; |
| | | } |