From b0a2949af127986559cf510d7193e1bb06ff37d4 Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期三, 31 十月 2018 16:42:55 +0800
Subject: [PATCH] 4435 子 【开发】【1.2.0】功能预告界面修改,新增可领取奖励 / 【前端】【1.2.0】功能预告界面修改,新增可领取奖励
---
System/MainInterfacePanel/FeatureNotice2Win.cs | 41 ++++++++++++++++++++++++++++++++++++++---
1 files changed, 38 insertions(+), 3 deletions(-)
diff --git a/System/MainInterfacePanel/FeatureNotice2Win.cs b/System/MainInterfacePanel/FeatureNotice2Win.cs
index 263f8b5..4c3c0ef 100644
--- a/System/MainInterfacePanel/FeatureNotice2Win.cs
+++ b/System/MainInterfacePanel/FeatureNotice2Win.cs
@@ -22,6 +22,7 @@
[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()
@@ -53,16 +54,28 @@
{
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)//鏄惁缁忓巻璺�
@@ -134,6 +147,28 @@
}
}
+ 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
}
--
Gitblit v1.8.0