From 871594462e82d6bc1341918d39e11ab036d59563 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期四, 18 九月 2025 19:26:28 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts
---
Main/System/Equip/EquipModel.cs | 7
Main/Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0102_tagCDBPlayer.cs | 14 +
Main/System/Settlement/BattleFailWin.cs.meta | 11 +
Main/System/Battle/BattleField/StoryBossBattleField.cs | 38 ----
Main/System/Settlement/BattleFailWin.cs | 42 +++++
Main/System/Settlement/BattleVictoryWin.cs.meta | 11 +
Main/System/Settlement/SettlementAwardCell.cs | 18 ++
Main/System/Settlement/SettlementAwardCell.cs.meta | 11 +
Main/System/Battle/BattleField/BattleField.cs | 70 +-------
Main/System/UIBase/UIBase.cs | 6
Main/System/Settlement.meta | 8 +
Main/System/Settlement/BattleSettlementManager.cs | 69 ++++++++
Main/Main.cs | 1
Main/System/Settlement/BattleVictoryWin.cs | 143 +++++++++++++++++
Main/System/Settlement/BattleSettlementManager.cs.meta | 11 +
15 files changed, 362 insertions(+), 98 deletions(-)
diff --git a/Main/Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0102_tagCDBPlayer.cs b/Main/Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0102_tagCDBPlayer.cs
index 557ea5d..ed285d0 100644
--- a/Main/Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0102_tagCDBPlayer.cs
+++ b/Main/Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0102_tagCDBPlayer.cs
@@ -5,7 +5,9 @@
public class DTC0102_tagCDBPlayer : DtcBasic
{
- public static event Action beforePlayerDataInitializeEvent;
+ public static event Action beforePlayerDataInitializeEvent; //閲嶇櫥鍒囨崲璐﹀彿 鎴栬�� 鐭殏鐨勬柇绾块噸杩� 閮戒細瑙﹀彂
+ public static event Action beforePlayerDataInitializeEventOnRelogin; //閲嶇櫥鍒囨崲璐﹀彿瑙﹀彂
+ public static event Action beforePlayerDataInitializeEventOnReconnect; //鏂嚎閲嶈繛瑙﹀彂
public static event Action afterPlayerDataInitializeEvent;
public static event Action switchAccountEvent;
public static bool isAfterPlayerDataInitialize = false; //鍙尯鍒嗘柇绾块噸杩炶繕鏄畬鍏ㄩ噸鐧�; 鍒囧埌鐧诲綍鍦烘櫙浼氶噸缃负false锛屾晠鍙垽鏂柇绾块噸杩�
@@ -24,6 +26,16 @@
beforePlayerDataInitializeEvent();
}
+ if (isAfterPlayerDataInitialize)
+ {
+ beforePlayerDataInitializeEventOnReconnect?.Invoke();
+ }
+ else
+ {
+ beforePlayerDataInitializeEventOnRelogin?.Invoke();
+ }
+
+
try
{
RedpointCenter.Instance.ResetAllRedpointState();
diff --git a/Main/Main.cs b/Main/Main.cs
index 9fa15eb..133b3e0 100644
--- a/Main/Main.cs
+++ b/Main/Main.cs
@@ -79,6 +79,7 @@
managers.Add(BlessLVManager.Instance);
managers.Add(AutoFightModel.Instance);
managers.Add(MainLevelManager.Instance);
+ managers.Add(BattleSettlementManager.Instance);
foreach (var manager in managers)
{
diff --git a/Main/System/Battle/BattleField/BattleField.cs b/Main/System/Battle/BattleField/BattleField.cs
index da5622d..bb0f762 100644
--- a/Main/System/Battle/BattleField/BattleField.cs
+++ b/Main/System/Battle/BattleField/BattleField.cs
@@ -3,7 +3,7 @@
using System;
using LitJson;
using DG.Tweening;
-using Codice.Client.BaseCommands;
+
public class BattleField
{
@@ -452,18 +452,25 @@
}
}
+ //鍚勪釜鎴樺満娌℃湁鍦烘櫙姒傚康锛屼笖鍙互鍏卞瓨锛屽悓鏃跺瓨鍦ㄦ垬鍦哄拰缁撶畻鐨勬儏鍐�
+ //鍐呴儴缁撶畻闇�瑕佸鐞嗙殑閫昏緫锛屼笉鍚玌I
protected virtual void OnSettlement(JsonData turnFightStateData)
{
}
+ //UI缁撶畻鍚庡洖璋冮渶瑕佸鐞嗙殑閫昏緫
+ public virtual void WhaleFall()
+ {
+ Destroy();
+ }
public virtual void OnBattleEnd(JsonData turnFightStateData)
{
BattleEndAction battleEndAction = new BattleEndAction(this, turnFightStateData, () =>
{
BattleDebug.LogError(turnFightStateData.ToJson());
- // 杩欓噷鍙互娣诲姞鎴樻枟缁撴潫鐨勫叿浣撻�昏緫
+ // 鎴樺満鑷韩鐨勭粨鏉熼�昏緫锛屼笉鍚粨绠楃瓑澶栭儴閫昏緫
OnSettlement(turnFightStateData);
int winFaction = (int)turnFightStateData["winFaction"];
@@ -482,63 +489,14 @@
IsBattleFinish = true;
-
- //鎻愪緵澶栭儴 鑳滃埄绛夊鍔辨樉绀�
- EventBroadcast.Instance.Broadcast<string, JsonData>(EventName.BATTLE_END, guid, turnFightStateData);
-
+ //鎻愪緵澶栭儴 鑳滃埄绛夊鍔辨樉绀�
+ if (guid != "")
+ EventBroadcast.Instance.Broadcast<string, JsonData>(EventName.BATTLE_END, guid, turnFightStateData);
+
+
});
recordPlayer.PlayRecord(battleEndAction);
- // 澶勭悊鎴樻枟缁撴潫閫昏緫
- // IsBattleFinish = true;
- // 缁撶畻閫昏緫
-
- // {
- // "itemInfo": [],
- // "winFaction": 1,//鑾疯儨闃佃惀: 涓�鑸负1鎴栬��2锛屽綋鐜╁鍙戣捣鐨勬垬鏂楁椂锛屽鏋滆幏鑳滈樀钀ヤ笉绛変簬1浠h〃鐜╁澶辫触浜�
- // "statInfo": {
- // "1": {
- // "1": {
- // "5": {
- // "NPCID": 0,
- // "DefHurt": 633,
- // "CureHP": 0,
- // "AtkHurt": 169247,
- // "ObjID": 1,
- // "HeroID": 510006
- // }
- // }
- // },
- // "2": {
- // "1": {
- // "2": {
- // "NPCID": 10101001,
- // "DefHurt": 169246,
- // "CureHP": 143096,
- // "AtkHurt": 999952,
- // "ObjID": 2,
- // "HeroID": 0
- // },
- // "4": {
- // "NPCID": 10101001,
- // "DefHurt": 0,
- // "CureHP": 0,
- // "AtkHurt": 0,
- // "ObjID": 3,
- // "HeroID": 0
- // },
- // "6": {
- // "NPCID": 10101001,
- // "DefHurt": 1,
- // "CureHP": 0,
- // "AtkHurt": 0,
- // "ObjID": 4,
- // "HeroID": 0
- // }
- // }
- // }
- // }
- // }
}
public virtual void HaveRest()
diff --git a/Main/System/Battle/BattleField/StoryBossBattleField.cs b/Main/System/Battle/BattleField/StoryBossBattleField.cs
index 4719ed4..637590d 100644
--- a/Main/System/Battle/BattleField/StoryBossBattleField.cs
+++ b/Main/System/Battle/BattleField/StoryBossBattleField.cs
@@ -77,50 +77,16 @@
protected override void OnSettlement(JsonData turnFightStateData)
{
base.OnSettlement(turnFightStateData);
-
-
}
- private void WhaleFall()
+ public override void WhaleFall()
{
- // YYL TODO 搴旇闇�瑕佷竴涓粨绠楃晫闈㈡潵鍋氳繖浜涘唴瀹�
UIManager.Instance.CloseWindow<FullScreenBattleWin>();
AutoFightModel.Instance.isPause = false;
Destroy();
}
- public override void OnBattleEnd(JsonData turnFightStateData)
- {
- BattleEndAction battleEndAction = new BattleEndAction(this, turnFightStateData, () =>
- {
- BattleDebug.LogError(turnFightStateData.ToJson());
- // 杩欓噷鍙互娣诲姞鎴樻枟缁撴潫鐨勫叿浣撻�昏緫
- OnSettlement(turnFightStateData);
-
- int winFaction = (int)turnFightStateData["winFaction"];
- //鑾疯儨闃佃惀: 涓�鑸负1鎴栬��2锛屽綋鐜╁鍙戣捣鐨勬垬鏂楁椂锛屽鏋滆幏鑳滈樀钀ヤ笉绛変簬1浠h〃鐜╁澶辫触浜�
-
- if (winFaction == 1)
- {
- Debug.LogError(guid + " : 鎴樻枟鑳滃埄");
- // 鎴樻枟鑳滃埄
- }
- else
- {
- // 鎴樻枟澶辫触
- Debug.LogError(guid + " : 鎴樻枟澶辫触");
- }
-
- IsBattleFinish = true;
-
-
- //鎻愪緵澶栭儴 鑳滃埄绛夊鍔辨樉绀�
- EventBroadcast.Instance.Broadcast<string, JsonData>(EventName.BATTLE_END, guid, turnFightStateData);
- WhaleFall();
-
- });
- recordPlayer.PlayRecord(battleEndAction);
- }
+
public override void HaveRest()
{
diff --git a/Main/System/Equip/EquipModel.cs b/Main/System/Equip/EquipModel.cs
index 06e3d8c..f6f2ead 100644
--- a/Main/System/Equip/EquipModel.cs
+++ b/Main/System/Equip/EquipModel.cs
@@ -30,7 +30,7 @@
public override void Init()
{
DTCA814_tagMCMakeItemAnswer.MakeItemAnswerEvent += OnEquipResult;
- DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent += BeforePlayerDataInitialize;
+ DTC0102_tagCDBPlayer.beforePlayerDataInitializeEventOnRelogin += BeforePlayerDataInitialize;
EventBroadcast.Instance.AddListener<string, BattleDrops, Action>(EventName.BATTLE_DROP_ITEMS, OnDropEvent);
ParseConfig();
}
@@ -38,7 +38,7 @@
public override void Release()
{
DTCA814_tagMCMakeItemAnswer.MakeItemAnswerEvent -= OnEquipResult;
- DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent -= BeforePlayerDataInitialize;
+ DTC0102_tagCDBPlayer.beforePlayerDataInitializeEventOnRelogin -= BeforePlayerDataInitialize;
EventBroadcast.Instance.RemoveListener<string, BattleDrops, Action>(EventName.BATTLE_DROP_ITEMS, OnDropEvent);
}
@@ -56,9 +56,6 @@
void BeforePlayerDataInitialize()
{
- //鏂嚎閲嶈繛涓嶅鐞�
- if (DTC0102_tagCDBPlayer.isAfterPlayerDataInitialize)
- return;
selectFloorEquip = null;
waitEquipOP.Clear();
lastShowEquipIndex = -1;
diff --git a/Main/System/Settlement.meta b/Main/System/Settlement.meta
new file mode 100644
index 0000000..1df8e84
--- /dev/null
+++ b/Main/System/Settlement.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 0df38c52ea781994ea7170717d52ad96
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Main/System/Settlement/BattleFailWin.cs b/Main/System/Settlement/BattleFailWin.cs
new file mode 100644
index 0000000..3b7cad3
--- /dev/null
+++ b/Main/System/Settlement/BattleFailWin.cs
@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+using Cysharp.Threading.Tasks;
+using LitJson;
+using UnityEngine;
+using UnityEngine.UI;
+
+//鎴樺満缁撶畻鐣岄潰锛屽瓨鍦ㄥ涓殑鎯呭喌
+public class BattleFailWin : UIBase
+{
+
+ [SerializeField] Button tipEquipBtn;
+ [SerializeField] Button tipHeroPosBtn;
+
+ string guid;
+
+ protected override void InitComponent()
+ {
+ tipEquipBtn.AddListener(() =>
+ {
+ CloseWindow();
+ });
+
+ tipHeroPosBtn.AddListener(() =>
+ {
+ CloseWindow();
+ UIManager.Instance.OpenWindow<HeroPosWin>();
+ });
+ }
+
+ protected override void OnPreOpen()
+ {
+ guid = BattleSettlementManager.Instance.notifyGuid;
+ }
+
+
+ protected override void OnPreClose()
+ {
+ BattleSettlementManager.Instance.WinShowOver(guid);
+ }
+
+}
\ No newline at end of file
diff --git a/Main/System/Settlement/BattleFailWin.cs.meta b/Main/System/Settlement/BattleFailWin.cs.meta
new file mode 100644
index 0000000..1e3bb1a
--- /dev/null
+++ b/Main/System/Settlement/BattleFailWin.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 981f35a8769fa4c4f8910ae337288f72
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Main/System/Settlement/BattleSettlementManager.cs b/Main/System/Settlement/BattleSettlementManager.cs
new file mode 100644
index 0000000..5678b63
--- /dev/null
+++ b/Main/System/Settlement/BattleSettlementManager.cs
@@ -0,0 +1,69 @@
+锘�
+
+using System.Collections.Generic;
+using LitJson;
+
+public partial class BattleSettlementManager : GameSystemManager<BattleSettlementManager>
+{
+ //缁撶畻鍚庨渶娓呴櫎
+ Dictionary<string, JsonData> battleSettlementDic = new Dictionary<string, JsonData>();
+ public string notifyGuid = string.Empty;
+
+ public override void Init()
+ {
+ DTC0102_tagCDBPlayer.beforePlayerDataInitializeEventOnRelogin += OnBeforePlayerDataInitialize;
+ EventBroadcast.Instance.AddListener<string, JsonData>(EventName.BATTLE_END, OnSettlement);
+
+ }
+
+ public override void Release()
+ {
+ DTC0102_tagCDBPlayer.beforePlayerDataInitializeEventOnRelogin -= OnBeforePlayerDataInitialize;
+
+ }
+
+
+
+ public void OnBeforePlayerDataInitialize()
+ {
+ battleSettlementDic.Clear();
+ }
+
+
+ //"Msg":{"itemInfo":[{"ItemID":5,"Count":2},{"ItemID":3,"Count":40}],"winFaction":1,"statInfo":{"1":{"1":{"1":{"NPCID":0,"DefHurt":727,"CureHP":0,"AtkHurt":1891,"ObjID":1,"HeroID":530004},"3":{"NPCID":0,"DefHurt":483,"CureHP":1511,"AtkHurt":782,"ObjID":6,"HeroID":520001},"2":{"NPCID":0,"DefHurt":953,"CureHP":0,"AtkHurt":1712,"ObjID":5,"HeroID":510003}}},"2":{"1":{"1":{"NPCID":10101091,"DefHurt":638,"CureHP":0,"AtkHurt":140,"ObjID":2,"HeroID":610001},"3":{"NPCID":10101092,"DefHurt":625,"CureHP":0,"AtkHurt":126,"ObjID":3,"HeroID":610001},"5":{"NPCID":10101093,"DefHurt":3122,"CureHP":0,"AtkHurt":1897,"ObjID":4,"HeroID":510003}}}}}
+ public void OnSettlement(string _guid, JsonData _data)
+ {
+ battleSettlementDic[_guid] = _data;
+ notifyGuid = _guid;
+ if (_data.ContainsKey("winFaction"))
+ {
+ var result = (int)_data["winFaction"];
+ if (result == 1)
+ {
+ UIManager.Instance.OpenWindow<BattleVictoryWin>();
+ }
+ else
+ {
+ UIManager.Instance.OpenWindow<BattleFailWin>();
+ }
+ }
+ }
+
+ public void WinShowOver(string _guid)
+ {
+ battleSettlementDic.Remove(_guid);
+ var battle = BattleManager.Instance.GetBattleField(_guid);
+ if (battle != null)
+ battle.WhaleFall();
+ }
+
+ public JsonData GetBattleSettlement(string _guid)
+ {
+ if (!battleSettlementDic.ContainsKey(_guid))
+ {
+ return null;
+ }
+ return battleSettlementDic[_guid];
+ }
+}
+
diff --git a/Main/System/Settlement/BattleSettlementManager.cs.meta b/Main/System/Settlement/BattleSettlementManager.cs.meta
new file mode 100644
index 0000000..d7a586c
--- /dev/null
+++ b/Main/System/Settlement/BattleSettlementManager.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ebb1b354e336d354eb5efe98c94596ab
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Main/System/Settlement/BattleVictoryWin.cs b/Main/System/Settlement/BattleVictoryWin.cs
new file mode 100644
index 0000000..80dce9b
--- /dev/null
+++ b/Main/System/Settlement/BattleVictoryWin.cs
@@ -0,0 +1,143 @@
+using System;
+using System.Collections.Generic;
+using Cysharp.Threading.Tasks;
+using LitJson;
+using UnityEngine;
+using UnityEngine.UI;
+
+// 銆愭垬鏂楃粨绠椼��
+// 褰撴敹鍒� // B4 20 鍥炲悎鍒舵垬鏂楃姸鎬� #tagMCTurnFightState State 涓� 4-缁撶畻锛屾椂锛屼唬琛ㄦ湰鍦烘垬鏂楀凡缁撴潫骞剁粨绠�
+// char Msg[Len]; //size = Len Msg淇℃伅涓�
+// {"winFaction":鑾疯儨闃佃惀, "statInfo":缁熻淇℃伅, 鈥渋temInfo鈥�:[濂栧姳鐗╁搧淇℃伅鍒楄〃]}
+// 鑾疯儨闃佃惀: 涓�鑸负1鎴栬��2锛屽綋鐜╁鍙戣捣鐨勬垬鏂楁椂锛屽鏋滆幏鑳滈樀钀ヤ笉绛変簬1浠h〃鐜╁澶辫触浜�
+// 缁熻淇℃伅锛� 鏍煎紡 {"闃佃惀缂栧彿":{"闃靛缂栧彿":{"绔欎綅缂栧彿":{璇ユ灏嗙粺璁′俊鎭瓧鍏竲, ...}, ...}, ...}
+// 闃佃惀缂栧彿锛� 涓�鑸椂1鎴�2锛� 瀵瑰簲 B424 鍚屾涓嬪幓鐨勯樀钀�
+// 闃靛缂栧彿锛� 闅跺睘浜庢煇涓樀钀ョ殑闃靛缂栧彿锛屼竴鑸槸浠�1寮�濮嬶紝涓�涓樀钀ュ湪澶歏澶氱殑鎯呭喌涓嬪彲浠ユ湁澶氫釜闃靛
+// 绔欎綅缂栧彿锛� 鏌愪釜闃靛涓灏嗘垬鏂楀疄渚嬬殑绔欎綅缂栧彿锛屼竴鑸粠1寮�濮嬶紝浠h〃绔欎綅1
+// 姝﹀皢缁熻淇℃伅瀛楀吀锛� 鏍煎紡锛� {"ObjID":瀹炰緥ID, "HeroID":鐜╁闃靛姝﹀皢ID, "NPCID":npc琛↖D, "AtkHurt":鎬昏緭鍑�, "DefHurt":鎬绘壙浼�, "CureHP":鎬绘不鐤梷
+
+// 澶勭悊鎴樻枟缁撴潫閫昏緫
+// IsBattleFinish = true;
+// 缁撶畻閫昏緫
+
+// {
+// "itemInfo": [],
+// "winFaction": 1,//鑾疯儨闃佃惀: 涓�鑸负1鎴栬��2锛屽綋鐜╁鍙戣捣鐨勬垬鏂楁椂锛屽鏋滆幏鑳滈樀钀ヤ笉绛変簬1浠h〃鐜╁澶辫触浜�
+// "statInfo": {
+// "1": {
+// "1": {
+// "5": {
+// "NPCID": 0,
+// "DefHurt": 633,
+// "CureHP": 0,
+// "AtkHurt": 169247,
+// "ObjID": 1,
+// "HeroID": 510006
+// }
+// }
+// },
+// "2": {
+// "1": {
+// "2": {
+// "NPCID": 10101001,
+// "DefHurt": 169246,
+// "CureHP": 143096,
+// "AtkHurt": 999952,
+// "ObjID": 2,
+// "HeroID": 0
+// },
+// "4": {
+// "NPCID": 10101001,
+// "DefHurt": 0,
+// "CureHP": 0,
+// "AtkHurt": 0,
+// "ObjID": 3,
+// "HeroID": 0
+// },
+// "6": {
+// "NPCID": 10101001,
+// "DefHurt": 1,
+// "CureHP": 0,
+// "AtkHurt": 0,
+// "ObjID": 4,
+// "HeroID": 0
+// }
+// }
+// }
+// }
+// }
+
+//"Msg":{"itemInfo":[{"ItemID":5,"Count":2},{"ItemID":3,"Count":40}],"winFaction":1,"statInfo":{"1":{"1":{"1":{"NPCID":0,"DefHurt":727,"CureHP":0,"AtkHurt":1891,"ObjID":1,"HeroID":530004},"3":{"NPCID":0,"DefHurt":483,"CureHP":1511,"AtkHurt":782,"ObjID":6,"HeroID":520001},"2":{"NPCID":0,"DefHurt":953,"CureHP":0,"AtkHurt":1712,"ObjID":5,"HeroID":510003}}},"2":{"1":{"1":{"NPCID":10101091,"DefHurt":638,"CureHP":0,"AtkHurt":140,"ObjID":2,"HeroID":610001},"3":{"NPCID":10101092,"DefHurt":625,"CureHP":0,"AtkHurt":126,"ObjID":3,"HeroID":610001},"5":{"NPCID":10101093,"DefHurt":3122,"CureHP":0,"AtkHurt":1897,"ObjID":4,"HeroID":510003}}}}}
+
+//鎴樺満缁撶畻鐣岄潰锛屽瓨鍦ㄥ涓殑鎯呭喌
+public class BattleVictoryWin : UIBase
+{
+
+ [SerializeField] ScrollerController scroller;
+
+ string guid;
+ protected override void OnPreOpen()
+ {
+ guid = BattleSettlementManager.Instance.notifyGuid;
+ scroller.OnRefreshCell += OnRefreshCell;
+ CreateScroller();
+ }
+
+
+ protected override void OnPreClose()
+ {
+ scroller.OnRefreshCell -= OnRefreshCell;
+ BattleSettlementManager.Instance.WinShowOver(guid);
+ }
+
+ List<Item> showItems = new List<Item>();
+ void CreateScroller()
+ {
+ var jsonData = BattleSettlementManager.Instance.GetBattleSettlement(guid);
+ if (jsonData == null)
+ {
+ DelayCloseWindow().Forget();
+ return;
+ }
+ showItems.Clear();
+ scroller.Refresh();
+
+ if (!jsonData.ContainsKey("itemInfo"))
+ {
+ return;
+ }
+
+ var resultStr = jsonData["itemInfo"];
+ for (int i = 0; i < resultStr.Count; i++)
+ {
+ showItems.Add(new Item((int)resultStr[i]["ItemID"], (long)resultStr[i]["Count"]));
+ }
+
+ showItems.Sort(SortItem);
+ for (int i = 0; i < showItems.Count; i++)
+ {
+ scroller.AddCell(ScrollerDataType.Header, i);
+ }
+ scroller.Restart();
+ }
+
+
+
+ int SortItem(Item itemA, Item itemB)
+ {
+ var itemConfigA = ItemConfig.Get(itemA.id);
+ var itemConfigB = ItemConfig.Get(itemB.id);
+ return itemConfigB.ItemColor - itemConfigA.ItemColor;
+ }
+
+
+
+
+ void OnRefreshCell(ScrollerDataType type, CellView cell)
+ {
+ var _cell = cell as SettlementAwardCell;
+ var item = showItems[cell.index];
+ _cell?.Display(item.id, item.countEx);
+ }
+
+}
\ No newline at end of file
diff --git a/Main/System/Settlement/BattleVictoryWin.cs.meta b/Main/System/Settlement/BattleVictoryWin.cs.meta
new file mode 100644
index 0000000..9add76c
--- /dev/null
+++ b/Main/System/Settlement/BattleVictoryWin.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 07f0dc21f424e6b4aa2c451e8b77a895
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Main/System/Settlement/SettlementAwardCell.cs b/Main/System/Settlement/SettlementAwardCell.cs
new file mode 100644
index 0000000..ea27d8d
--- /dev/null
+++ b/Main/System/Settlement/SettlementAwardCell.cs
@@ -0,0 +1,18 @@
+锘縰sing UnityEngine;
+
+public class SettlementAwardCell : CellView
+{
+ [SerializeField] ItemCell itemCell;
+ [SerializeField] TextEx txtItemName;
+
+ public void Display(int itemID, long count)
+ {
+
+ itemCell.Init(new ItemCellModel(itemID, false, count));
+ txtItemName.text = ItemConfig.Get(itemID).ItemName;
+ itemCell.button.SetListener(() =>
+ {
+ ItemTipUtility.Show(itemID);
+ });
+ }
+}
diff --git a/Main/System/Settlement/SettlementAwardCell.cs.meta b/Main/System/Settlement/SettlementAwardCell.cs.meta
new file mode 100644
index 0000000..0b2354f
--- /dev/null
+++ b/Main/System/Settlement/SettlementAwardCell.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: eb5f5e472d8ba234290fd09921b0ec86
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Main/System/UIBase/UIBase.cs b/Main/System/UIBase/UIBase.cs
index 26f8e34..5945b93 100644
--- a/Main/System/UIBase/UIBase.cs
+++ b/Main/System/UIBase/UIBase.cs
@@ -406,6 +406,12 @@
UIManager.Instance.CloseWindow(this, false);
}
+ public async UniTask DelayCloseWindow(int delayTime = 30)
+ {
+ await UniTask.Delay(delayTime);
+ CloseWindow();
+ }
+
// 鍒锋柊UI
public virtual void Refresh()
{
--
Gitblit v1.8.0