| | |
| | |
|
| | | [SerializeField] ScrollerController m_ScrollerControl;
|
| | |
|
| | | FunctionUnlockFlyObjectTarget flyObjectTarget;
|
| | |
|
| | | JadeDynastySkillModel model
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<JadeDynastySkillModel>(); }
|
| | |
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | if (flyObjectTarget != null)
|
| | | {
|
| | | Destroy(flyObjectTarget);
|
| | | }
|
| | |
|
| | | SetDefaultSelect();
|
| | | Display();
|
| | |
|
| | | model.selectSkillRefresh += SelectSkillRefresh;
|
| | | model.skillRefresh += SkillRefresh;
|
| | | ActivateShow.prepareFlySkillEvent += PrepareFlySkillEvent;
|
| | | ActivateShow.complelteFlySkillEvent += ComplelteFlySkillEvent;
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | |
| | | {
|
| | | model.selectSkillRefresh -= SelectSkillRefresh;
|
| | | model.skillRefresh -= SkillRefresh;
|
| | | ActivateShow.prepareFlySkillEvent -= PrepareFlySkillEvent;
|
| | | ActivateShow.complelteFlySkillEvent -= ComplelteFlySkillEvent;
|
| | |
|
| | | if (flyObjectTarget != null)
|
| | | {
|
| | | Destroy(flyObjectTarget);
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void PrepareFlySkillEvent(ActivateShow.ActivateFunc type, int skillId)
|
| | | {
|
| | | if (type == ActivateShow.ActivateFunc.JadeDynastySkill)
|
| | | {
|
| | | var index = model.mySkills.IndexOf(skillId);
|
| | | if (index != -1)
|
| | | {
|
| | | m_ScrollerControl.JumpIndex(index);
|
| | | var cell = m_ScrollerControl.GetActiveCellView(skillId);
|
| | | if (cell != null)
|
| | | {
|
| | | var skillCell = cell as JadeDynastySkillCell;
|
| | | flyObjectTarget = skillCell.flyPoint.AddMissingComponent<FunctionUnlockFlyObjectTarget>();
|
| | | flyObjectTarget.IdList = new int[] { skillId };
|
| | | flyObjectTarget.Z_UnLockType = FunctionUnlockType.Skill;
|
| | | FunctionUnlockFlyObjectTargetCenter.Register(FunctionUnlockType.Skill, new int[] { skillId }, flyObjectTarget);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void ComplelteFlySkillEvent(ActivateShow.ActivateFunc type)
|
| | | {
|
| | | if (type == ActivateShow.ActivateFunc.JadeDynastySkill)
|
| | | {
|
| | | if (flyObjectTarget != null)
|
| | | {
|
| | | Destroy(flyObjectTarget);
|
| | | }
|
| | | m_ScrollerControl.m_Scorller.RefreshActiveCellViews();
|
| | | }
|
| | | }
|
| | |
|
| | | private void SelectSkillRefresh(int skillId)
|
| | | {
|
| | | DisplaySkillDetail();
|