From fad29a67b22ffc1a90f453dc03c91fe9ba891de0 Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期三, 12 九月 2018 17:40:23 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/MainInterfacePanel/FeatureNoticeWin.cs | 44 +++++++++++++++++++-------------------------
1 files changed, 19 insertions(+), 25 deletions(-)
diff --git a/System/MainInterfacePanel/FeatureNoticeWin.cs b/System/MainInterfacePanel/FeatureNoticeWin.cs
index ebe3c2e..383f6e7 100644
--- a/System/MainInterfacePanel/FeatureNoticeWin.cs
+++ b/System/MainInterfacePanel/FeatureNoticeWin.cs
@@ -26,9 +26,8 @@
[SerializeField] Text m_TextUnopened;//鏈紑鍚�
[SerializeField] Text m_Textschedule;//杩涘害
[SerializeField] Button m_ButtonGoto;
- List<FunctionForecastConfig> FunctionList = new List<FunctionForecastConfig>();
-
TreasureModel treasureModel { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
+ FeatureNoticeModel featureNoticeModel { get { return ModelCenter.Instance.GetModel<FeatureNoticeModel>(); } }
#region Built-in
private int ClickFuncID = 0;
protected override void BindController()
@@ -42,7 +41,6 @@
protected override void OnPreOpen()
{
- AddList();//娣诲姞鏁扮粍鍒楄〃
DefaultSelection();//鑾峰彇榛樿閫夋嫨
m_ScrollerController.OnRefreshCell += OnRefreshGridCell;
OnCreateGridLineCell(m_ScrollerController);
@@ -64,6 +62,10 @@
m_ScrollerController.OnRefreshCell -= OnRefreshGridCell;
treasureModel.treasureStateChangeEvent -= treasureStateChangeEvent;
treasureModel.treasureStageUpEvent -= treasureStageUpEvent;
+ if (featureNoticeModel.redPointStre1.state == RedPointState.Simple)
+ {
+ featureNoticeModel.redPointStre1.state = RedPointState.None;
+ }
}
private void treasureStageUpEvent(int obj)
@@ -94,15 +96,15 @@
void OnCreateGridLineCell(ScrollerController gridCtrl)
{
gridCtrl.Refresh();
- for (int i = 0; i < FunctionList.Count; i++)
+ for (int i = 0; i < featureNoticeModel.FunctionList.Count; i++)
{
if (i == 0)
{
- gridCtrl.AddCell(ScrollerDataType.Header, FunctionList[i].FuncId);
+ gridCtrl.AddCell(ScrollerDataType.Header, featureNoticeModel.FunctionList[i].FuncId);
}
else
{
- gridCtrl.AddCell(ScrollerDataType.Normal, FunctionList[i].FuncId);
+ gridCtrl.AddCell(ScrollerDataType.Normal, featureNoticeModel.FunctionList[i].FuncId);
}
}
gridCtrl.Restart();
@@ -160,22 +162,6 @@
{
}
#endregion
- private void AddList()//娣诲姞鍒楄〃淇℃伅
- {
- if (FunctionList.Count <= 0)
- {
- var configs = Config.Instance.GetAllKeys<FunctionForecastConfig>();
- foreach (var key in configs)
- {
- var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(key);
- if (functionForecastConfig != null && functionForecastConfig.Display == 1)
- {
- FunctionList.Add(functionForecastConfig);
- }
- }
- }
- }
-
private void DefaultSelection()//鑾峰彇榛樿閫夋嫨
{
var configs = Config.Instance.GetAllValues<FunctionForecastConfig>();
@@ -190,14 +176,14 @@
}
if (ClickFuncID == 0)
{
- ClickFuncID = FunctionList[0].FuncId;
+ ClickFuncID = featureNoticeModel.FunctionList[0].FuncId;
}
}
private int JumpIndex()//Jump閫変腑
{
int Index = 0;
- Index = FunctionList.FindIndex((x)=>
+ Index = featureNoticeModel.FunctionList.FindIndex((x)=>
{
return x.FuncId == ClickFuncID;
});
@@ -296,7 +282,15 @@
{
if (treasure.stage == funcStage - 1 || funcStage == 0)
{
- m_Textschedule.text = (float)treasure.exp / treasure.treasureStages[funcStage].exp+"%";
+ if (treasure.exp >= treasure.treasureStages[funcStage].exp)
+ {
+ m_Textschedule.text = "100%";
+ }
+ else
+ {
+ m_Textschedule.text = (float)treasure.exp / treasure.treasureStages[funcStage].exp + "%";
+ }
+
}
else
{
--
Gitblit v1.8.0