| | |
| | | [SerializeField] FeatureNoticeTip m_FeatureNoticeTip; |
| | | [SerializeField] ScaleTween m_ScaleTween;
|
| | | FeatureNoticeModel featureNoticeModel { get { return ModelCenter.Instance.GetModel<FeatureNoticeModel>(); } }
|
| | | public int Offset = 0;//偏移
|
| | | private bool IsJump = false; |
| | | #region Built-in |
| | | protected override void BindController() |
| | |
| | | {
|
| | | m_ScaleTween.SetEndState();
|
| | | } |
| | | } |
| | | |
| | | featureNoticeModel.UpdateAwarfItem += UpdateAwarfItem; |
| | | }
|
| | |
|
| | | private void UpdateAwarfItem()
|
| | | {
|
| | | m_ScrollerController.m_Scorller.RefreshActiveCellViews();//刷新可见
|
| | | }
|
| | |
|
| | | protected override void OnPreClose() |
| | | { |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | | { |
| | | featureNoticeModel.UpdateAwarfItem -= UpdateAwarfItem; |
| | | }
|
| | |
|
| | | protected override void OnActived()
|
| | | {
|
| | | var offset = 0f;
|
| | | m_ScrollerController.JumpIndex(JumpIndex(), ref offset);
|
| | | m_ScrollerController.JumpIndex(Offset + offset, 0, EnhancedScroller.TweenType.immediate);
|
| | | }
|
| | | private void OnClickBtn()
|
| | | {
|
| | | if (!WindowJumpMgr.Instance.IsJumpState)//是否经历跳
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private int JumpIndex()//Jump选中
|
| | | {
|
| | | int Index = 0;
|
| | | for (int i = 0; i < featureNoticeModel.FunctionList.Count; i++)
|
| | | {
|
| | | int funcID = featureNoticeModel.FunctionList[i].FuncId;
|
| | | if (featureNoticeModel.DicRedPoint.ContainsKey(funcID) && featureNoticeModel.DicRedPoint[funcID].state==RedPointState.Simple)
|
| | | {
|
| | | Index = i;
|
| | | return Index;
|
| | | }
|
| | | }
|
| | | Index = featureNoticeModel.FunctionList.FindIndex((x) =>
|
| | | {
|
| | | return x.FuncId == featureNoticeModel.FunctionForecastIndex;
|
| | | });
|
| | | if (Index == -1)
|
| | | {
|
| | | Index = 0;
|
| | | }
|
| | | return Index;
|
| | | }
|
| | | #endregion |
| | |
|
| | | } |