| | |
| | | [SerializeField] Button m_LeftBtn;
|
| | | [SerializeField] Button m_RightBtn;
|
| | | [SerializeField] List<SkillCell> equipPassSkills = new List<SkillCell>();
|
| | | [SerializeField] List<UIEffect> equipPassEffects = new List<UIEffect>();
|
| | | [SerializeField] Image m_DragImg;
|
| | | [SerializeField] Image m_DragSkillImg;
|
| | | [SerializeField] List<Button> m_PageBtns = new List<Button>();
|
| | |
| | | [SerializeField] ScrollerController scrollerController;
|
| | | [SerializeField] RectTransform m_ContainerGetWay;
|
| | | [SerializeField] ClickScreenOtherSpace clickOtherSpace;
|
| | | [SerializeField, Header("特效时长")] float m_EffectDuration = 1f;
|
| | | private List<SkillConfig> skillListPass = new List<SkillConfig>();
|
| | | private int presentSltEquipIndex = -1;
|
| | | Coroutine cacheCoroutine = null;
|
| | | SkillModel m_Model;
|
| | | SkillModel model
|
| | | {
|
| | |
| | | return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<SkillModel>());
|
| | | }
|
| | | }
|
| | |
|
| | | PlayerTaskDatas task { get { return ModelCenter.Instance.GetModel<PlayerTaskDatas>(); } }
|
| | |
|
| | | RolePromoteModel m_PromoteModel;
|
| | | RolePromoteModel promoteModel
|
| | |
| | | UpdateEquipPassSkill();
|
| | | SetEquipHoleSelect(GetEquipHoleIndex(model.presentSltSkillID));
|
| | | DayRemind.Instance.SetDayRemind(DayRemind.PASS_SKILL_REDPOINT, true);
|
| | |
|
| | | if (cacheCoroutine != null)
|
| | | {
|
| | | StopCoroutine(cacheCoroutine);
|
| | | cacheCoroutine = null;
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnActived()
|
| | |
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | DisplayEffect();
|
| | | model.taskUnlockUpdate += TaskUnlockUpdate;
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | |
| | | model.OnRefreshSltSkill -= OnRefreshSltSkill;
|
| | | model.UpdatePassEquipSkillEvent -= UpdatePassEquipSkillEvent;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= OnRefreshPlayerInfo;
|
| | | model.taskUnlockUpdate -= TaskUnlockUpdate;
|
| | | model.SetDayRemind();
|
| | | model.UnlockPassHole = 0;
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | model.SendEquipPage();
|
| | | }
|
| | |
|
| | | private void TaskUnlockUpdate()
|
| | | {
|
| | | DisplayEffect();
|
| | | }
|
| | |
|
| | | void DisplayEffect()
|
| | | {
|
| | | if (model.UnlockPassHole != 0)
|
| | | {
|
| | | var index = 0;
|
| | | for (int i = 0; i < equipPassSkills.Count; i++)
|
| | | {
|
| | | PassSkillLimit limit;
|
| | | if (model.TryGetPassSkillLimit(i, out limit))
|
| | | {
|
| | | if (limit.OpenSkillSlots != 0 && limit.OpenSkillSlots == model.UnlockPassHole)
|
| | | {
|
| | | index = i;
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | model.UnlockPassHole = 0;
|
| | | if (index >= 0 && index < equipPassEffects.Count)
|
| | | {
|
| | | equipPassEffects[index].Play();
|
| | | cacheCoroutine = StartCoroutine(Co_UnlockEffectComplete());
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | IEnumerator Co_UnlockEffectComplete()
|
| | | {
|
| | | var duration = m_EffectDuration > 0f ? m_EffectDuration : 1.0f;
|
| | | yield return WaitingForSecondConst.GetWaitForSeconds(duration);
|
| | | SysNotifyMgr.Instance.ShowTip("PassNewHole");
|
| | | UpdateEquipPassSkill();
|
| | | }
|
| | |
|
| | | protected override void LateUpdate()
|
| | |
| | | else if (_limit.MountLv > 0 && promoteModel.GetMountTotallv() < _limit.MountLv)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | else if (_limit.OpenSkillSlots > 0 && !model.IsTaskHoleUnlock(_limit.OpenSkillSlots))
|
| | | {
|
| | | return false;
|
| | | }
|
| | | }
|
| | | return false;
|
| | |
| | | continue;
|
| | | }
|
| | | }
|
| | | else if (limit.OpenSkillSlots > 0)
|
| | | {
|
| | | if (!model.IsTaskHoleUnlock(limit.OpenSkillSlots) || model.UnlockPassHole == limit.OpenSkillSlots)
|
| | | {
|
| | | SetEquipSkillDeActive(i);
|
| | | equipPassSkills[i].skillData.m_SkillNameTxt.color = equipHoleLimitColor;
|
| | | var taskName = string.Empty;
|
| | | if (model.taskHoleDict.ContainsKey(limit.OpenSkillSlots))
|
| | | {
|
| | | var taskConfig = Config.Instance.Get<PyTaskConfig>(model.taskHoleDict[limit.OpenSkillSlots]);
|
| | | if (taskConfig != null)
|
| | | {
|
| | | var taskInfoConfig = Config.Instance.Get<TASKINFOConfig>(taskConfig.name);
|
| | | taskName = taskInfoConfig == null ? string.Empty : taskInfoConfig.show_writing;
|
| | | }
|
| | | }
|
| | | equipPassSkills[i].skillData.m_SkillNameTxt.text =
|
| | | UIHelper.ReplaceNewLine(Language.Get(StringUtility.Contact("PassSkillHoleLimitTask_", limit.OpenSkillSlots)));
|
| | | continue;
|
| | | }
|
| | | }
|
| | | }
|
| | | int _skillId = 0;
|
| | | equipPassSkills[i].skillData.m_SkillNameTxt.text = string.Empty;
|
| | |
| | | m_GetWayBtn.gameObject.SetActive(true);
|
| | | }
|
| | | }
|
| | | else if (limit.OpenSkillSlots > 0)
|
| | | {
|
| | | if (!model.IsTaskHoleUnlock(limit.OpenSkillSlots))
|
| | | {
|
| | | var taskName = string.Empty;
|
| | | if (model.taskHoleDict.ContainsKey(limit.OpenSkillSlots))
|
| | | {
|
| | | var taskConfig = Config.Instance.Get<PyTaskConfig>(model.taskHoleDict[limit.OpenSkillSlots]);
|
| | | if (taskConfig != null)
|
| | | {
|
| | | var taskInfoConfig = Config.Instance.Get<TASKINFOConfig>(taskConfig.name);
|
| | | taskName = taskInfoConfig == null ? string.Empty : taskInfoConfig.show_writing;
|
| | | }
|
| | | }
|
| | | SysNotifyMgr.Instance.ShowTip(StringUtility.Contact("PassSkillHoleLimitTask_", limit.OpenSkillSlots));
|
| | | m_GetWayBtn.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|