From 2fb0f9761ef9789ce068fbe26d2e4c7af1148ec0 Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期二, 19 二月 2019 23:49:06 +0800
Subject: [PATCH] 3335 物品管理相关功能重构。
---
System/Strengthening/GodBeastReinforcementWin.cs | 116 +++++++++++++++++++++++++++++-----------------------------
1 files changed, 58 insertions(+), 58 deletions(-)
diff --git a/System/Strengthening/GodBeastReinforcementWin.cs b/System/Strengthening/GodBeastReinforcementWin.cs
index 30d33d9..71477a1 100644
--- a/System/Strengthening/GodBeastReinforcementWin.cs
+++ b/System/Strengthening/GodBeastReinforcementWin.cs
@@ -1,17 +1,17 @@
-锘�//--------------------------------------------------------
-// [Author]: 绗簩涓栫晫
-// [ Date ]: Thursday, August 16, 2018
-//--------------------------------------------------------
-
+锘�//--------------------------------------------------------
+// [Author]: 绗簩涓栫晫
+// [ Date ]: Thursday, August 16, 2018
+//--------------------------------------------------------
+
using EnhancedUI.EnhancedScroller;
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
using UnityEngine.UI;
//绁炲吔寮哄寲
namespace Snxxz.UI
-{
+{
public class GodBeastClass
{
public int GodBeastNumber;//绁炲吔缂栧彿
@@ -24,11 +24,11 @@
public int EquipScore;//瑁呭璇勫垎
public int ItemPlace;//鑳屽寘瑁呭浣嶇疆
public int GodBeastId;//绁炲吔ID
- }
- public class GodBeastReinforcementWin : Window
+ }
+ public class GodBeastReinforcementWin : Window
{
- [SerializeField] ScrollerController m_ScrollerController;
- [SerializeField] GodBeastSlidingList m_GodBeastSlidingList;
+ [SerializeField] ScrollerController m_ScrollerController;
+ [SerializeField] GodBeastSlidingList m_GodBeastSlidingList;
[SerializeField] GameObject m_Listprompt_Text;
[SerializeField] GodBeastAttributes m_GodBeastAttributes;
[SerializeField] UIEffect m_UIEffect;
@@ -39,26 +39,26 @@
GodBeastModel GodBeastModel;
GodBeastModel godBeastModel { get { return GodBeastModel ?? (GodBeastModel = ModelCenter.Instance.GetModel<GodBeastModel>()); } }
public static event Action<int> ChooseToModify;
- private List<GodBeastClass> GodBeastList = new List<GodBeastClass>();
- private int CurrentlySelected = 0;
- private int JumpIndex = 0;
- public int Offset = 0;//鍋忕Щ閲�
- #region Built-in
- protected override void BindController()
+ private List<GodBeastClass> GodBeastList = new List<GodBeastClass>();
+ private int CurrentlySelected = 0;
+ private int JumpIndex = 0;
+ public int Offset = 0;//鍋忕Щ閲�
+ #region Built-in
+ protected override void BindController()
{
- m_ScrollerController.OnRefreshCell += OnRefreshGridCell;
- }
-
- protected override void AddListeners()
+ m_ScrollerController.OnRefreshCell += OnRefreshGridCell;
+ }
+
+ protected override void AddListeners()
{
-
- }
-
- protected override void OnPreOpen()
+
+ }
+
+ protected override void OnPreOpen()
{
CurrentlySelected = 0;
GetGodBeast();//鑾峰彇绁炲吔寮哄寲瑁呭淇℃伅
-
+
if (godBeastModel.ItemPlace != -1)//瑁呭寮哄寲璺宠浆閫変腑
{
for (int i = 0; i < GodBeastList.Count; i++)
@@ -100,35 +100,35 @@
JumpIndex = 0;
}
}
- }
+ }
OnCreateGridLineCell(m_ScrollerController);
- m_GodBeastSlidingList.Init();
- m_GodBeastAttributes.Init();
+ m_GodBeastSlidingList.Init();
+ m_GodBeastAttributes.Init();
m_GodBeastAttributes.GetGodBeastLocationMarker(CurrentlySelected);
- }
-
+ }
+
protected override void OnActived()
{
var offset = 0f;
m_ScrollerController.JumpIndex(JumpIndex,ref offset);
m_ScrollerController.JumpIndex(Offset + offset, 0, EnhancedScroller.TweenType.immediate);
- }
- protected override void OnAfterOpen()
- {
+ }
+ protected override void OnAfterOpen()
+ {
playerPack.RefreshItemCountAct += RefreshItemCountAct;
- DTC0721_tagMakeItemAnswer.MakeItemAnswerEvent += MakeItemAnswerEvent;
- }
-
- protected override void OnPreClose()
+ DTC0721_tagMakeItemAnswer.MakeItemAnswerEvent += MakeItemAnswerEvent;
+ }
+
+ protected override void OnPreClose()
{
JumpIndex = 0;
godBeastModel.ItemPlace = -1;
playerPack.RefreshItemCountAct -= RefreshItemCountAct;
- DTC0721_tagMakeItemAnswer.MakeItemAnswerEvent -= MakeItemAnswerEvent;
+ DTC0721_tagMakeItemAnswer.MakeItemAnswerEvent -= MakeItemAnswerEvent;
}
private void MakeItemAnswerEvent(H0721_tagMakeItemAnswer obj)
@@ -150,11 +150,11 @@
}
}
- protected override void OnAfterClose()
- {
+ protected override void OnAfterClose()
+ {
}
- #endregion
-
+ #endregion
+
private void GetGodBeast()//瀛樺偍绁炲吔寮哄寲鍒楄〃鏁版嵁鍜屾帓搴�
{
GodBeastList.Clear();
@@ -173,7 +173,7 @@
godBeastClass.GodBeastQuality = itemModel[i].config.ItemColor;
godBeastClass.GodBeastStar = itemModel[i].config.StarLevel;
godBeastClass.EquipScore = itemModel[i].equipScore;
- godBeastClass.ItemPlace = itemModel[i].itemInfo.ItemPlace;
+ godBeastClass.ItemPlace = itemModel[i].itemPlace;
godBeastClass.GodBeastId = key;
var IudetDogzEquipPlus = itemModel[i].GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);// 绁炲吔瑁呭寮哄寲淇℃伅鍒楄〃 [寮哄寲绛夌骇, 寮哄寲鐔熺粌搴
if (IudetDogzEquipPlus == null)
@@ -220,7 +220,7 @@
return -x.EquipScore.CompareTo(y.EquipScore);
}
return 1;
- }
+ }
void OnCreateGridLineCell(ScrollerController gridCtrl)
{
gridCtrl.Refresh();
@@ -259,8 +259,8 @@
}
}
});
- }
-
+ }
+
private void GetDogZBagIndex()//鑾峰彇閫夋嫨鐨勭鍏借澶囩殑瑁呭涓嬫爣
{
for (int i = 0; i < GodBeastList.Count; i++)
@@ -273,11 +273,11 @@
}
}
- }
- }
-
-}
-
-
-
-
+ }
+ }
+
+}
+
+
+
+
--
Gitblit v1.8.0