Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts
| | |
| | | [SerializeField] TextEx txtEnemyName; |
| | | [SerializeField] TextEx txtMyScore; |
| | | [SerializeField] TextEx txtEnemyScore; |
| | | [SerializeField] TextEx txtFuncName; |
| | | [SerializeField] TextEx txtFuncName; |
| | | [SerializeField] ScrollerController scroller; |
| | | [SerializeField] ButtonEx detailBtn; |
| | | JsonData jsonData; |
| | | string battleName = BattleConst.ArenaBattleField; |
| | | protected override void InitComponent() |
| | | { |
| | | |
| | | detailBtn.SetListener(() => |
| | | { |
| | | BattleSettlementManager.Instance.OpenBattleDetailWin(battleName); |
| | | }); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | |
| | | using LitJson; |
| | | using UnityEngine; |
| | | |
| | | // 【战斗结算】 |
| | | // 当收到 // B4 20 回合制战斗状态 #tagMCTurnFightState State 为 4-结算,时,代表本场战斗已结束并结算 |
| | | // char Msg[Len]; //size = Len Msg信息为 |
| | | // {"winFaction":获胜阵营, "statInfo":统计信息, “itemInfo“:[奖励物品信息列表]} |
| | | // 获胜阵营: 一般为1或者2,当玩家发起的战斗时,如果获胜阵营不等于1代表玩家失败了 |
| | | // 统计信息: 格式 {"阵营编号":{"阵容编号":{"站位编号":{该武将统计信息字典}, ...}, ...}, ...} |
| | | // 阵营编号: 一般时1或2, 对应 B424 同步下去的阵营 |
| | | // 阵容编号: 隶属于某个阵营的阵容编号,一般是从1开始,一个阵营在多V多的情况下可以有多个阵容 |
| | | // 站位编号: 某个阵容中武将战斗实例的站位编号,一般从1开始,代表站位1 |
| | | // 武将统计信息字典: 格式: {"ObjID":实例ID, "HeroID":玩家阵容武将ID, "NPCID":npc表ID, "AtkHurt":总输出, "DefHurt":总承伤, "CureHP":总治疗} |
| | | |
| | | // 处理战斗结束逻辑 |
| | | // IsBattleFinish = true; |
| | | // 结算逻辑 |
| | | |
| | | // { |
| | | // "itemInfo": [], |
| | | // "winFaction": 1,//获胜阵营: 一般为1或者2,当玩家发起的战斗时,如果获胜阵营不等于1代表玩家失败了 |
| | | // "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 ArenaBattleVictoryWin : UIBase |
| | | { |
| | | [SerializeField] AvatarCell myAvatarCell; |
| | |
| | | [SerializeField] TextEx txtEnemyScore; |
| | | [SerializeField] TextEx txtFuncName; |
| | | [SerializeField] ScrollerController scroller; |
| | | [SerializeField] ButtonEx detailBtn; |
| | | JsonData jsonData; |
| | | string battleName = BattleConst.ArenaBattleField; |
| | | |
| | | protected override void InitComponent() |
| | | { |
| | | detailBtn.SetListener(() => |
| | | { |
| | | BattleSettlementManager.Instance.OpenBattleDetailWin(battleName); |
| | | }); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | scroller.OnRefreshCell += OnRefreshCell; |
| | |
| | | Display(); |
| | | CreateScroller(); |
| | | } |
| | | |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 4bbbbe8703e9deb48b7dac26a1186b93 |
| | | folderAsset: yes |
| | | DefaultImporter: |
| | | externalObjects: {} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | public class BattleDetailHeroInfoItem : MonoBehaviour |
| | | { |
| | | [SerializeField] ImageEx imgHeadBg; |
| | | [SerializeField] ImageEx imgHead; |
| | | [SerializeField] TextEx txtLV; |
| | | [SerializeField] ImageEx imgCountry; |
| | | [SerializeField] List<Image> starImgList; |
| | | [SerializeField] ImageEx imgMask; |
| | | [SerializeField] TextEx txtHeroName; |
| | | [SerializeField] ImageEx imgMVP; |
| | | |
| | | [SerializeField] ImageEx imgAtkHurt; |
| | | [SerializeField] TextEx txtAtkHurt; |
| | | |
| | | [SerializeField] ImageEx imgDefHurt; |
| | | [SerializeField] TextEx txtDefHurt; |
| | | |
| | | [SerializeField] ImageEx imgCureHP; |
| | | [SerializeField] TextEx txtCureHP; |
| | | |
| | | public void Display(BattleDetailHeroInfoItemData data) |
| | | { |
| | | if (data == null || data.info == null) |
| | | return; |
| | | BattleDetailHeroInfo info = data.info; |
| | | |
| | | int heroID = info.HeroID; |
| | | if (!HeroConfig.HasKey(heroID)) |
| | | return; |
| | | HeroConfig heroConfig = HeroConfig.Get(heroID); |
| | | |
| | | |
| | | int skinID = info.Skin; |
| | | if (!HeroSkinConfig.HasKey(skinID)) |
| | | return; |
| | | HeroSkinConfig skinConfig = HeroSkinConfig.Get(skinID); |
| | | |
| | | bool isDead = info.Dead == 1; |
| | | imgMask.SetActive(isDead); |
| | | imgMVP.SetActive(data.index == data.mvpIndex); |
| | | |
| | | imgHeadBg.SetSprite("heroheadBG" + heroConfig.Quality); |
| | | |
| | | var sprite = UILoader.LoadSprite("HeroHead", skinConfig.SquareIcon); |
| | | if (sprite == null) |
| | | { |
| | | imgHead.SetSprite("herohead_default"); |
| | | } |
| | | else |
| | | { |
| | | imgHead.overrideSprite = sprite; |
| | | } |
| | | |
| | | imgCountry.SetSprite(HeroUIManager.Instance.GetCountryIconName(heroConfig.Country)); |
| | | txtHeroName.text = heroConfig.Name; |
| | | txtLV.text = StringUtility.Concat(Language.Get("L1094"), info.LV.ToString()); |
| | | DisplayStars(info.Star); |
| | | |
| | | DisplaySlider(imgAtkHurt, txtAtkHurt, info.AtkHurt, data.maxAtk); |
| | | DisplaySlider(imgDefHurt, txtDefHurt, info.DefHurt, data.maxDef); |
| | | DisplaySlider(imgCureHP, txtCureHP, info.CureHP, data.maxCure); |
| | | } |
| | | |
| | | |
| | | |
| | | private void DisplaySlider(ImageEx imgSlider, TextEx txtSlider, ulong value, ulong maxValue) |
| | | { |
| | | if (maxValue > 0) |
| | | { |
| | | ulong safeValue = value > maxValue ? maxValue : value; |
| | | double ratioDouble = (double)safeValue / maxValue; |
| | | imgSlider.fillAmount = (float)ratioDouble; |
| | | } |
| | | else |
| | | { |
| | | imgSlider.fillAmount = 0.0f; |
| | | } |
| | | txtSlider.text = UIHelper.ReplaceLargeNum(value); |
| | | } |
| | | |
| | | void DisplayStars(int starCnt) |
| | | { |
| | | for (int i = 0; i < starImgList.Count; i++) |
| | | { |
| | | if (starCnt == 0 && i == 0) |
| | | { |
| | | // 无星级 特殊处理 |
| | | starImgList[i].SetActive(true); |
| | | starImgList[i].SetSprite("herostar" + starCnt); |
| | | } |
| | | else if ((starCnt - 1) % starImgList.Count >= i) |
| | | { |
| | | starImgList[i].SetActive(true); |
| | | starImgList[i].SetSprite("herostar" + (((starCnt - 1) / starImgList.Count) + 1) * starImgList.Count); |
| | | } |
| | | else |
| | | { |
| | | starImgList[i].SetActive(false); |
| | | } |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: a54f54c7e7fc54c4394cb08bc22034dd |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | |
| | | public class BattleDetailWin : UIBase |
| | | { |
| | | [SerializeField] TextEx redName; |
| | | [SerializeField] TextEx blueName; |
| | | [SerializeField] List<BattleDetailHeroInfoItem> redList = new List<BattleDetailHeroInfoItem>(); |
| | | [SerializeField] List<BattleDetailHeroInfoItem> blueList = new List<BattleDetailHeroInfoItem>(); |
| | | BattleSettlementManager manager { get { return BattleSettlementManager.Instance; } } |
| | | protected override void OnPreOpen() |
| | | { |
| | | Display(); |
| | | } |
| | | |
| | | public void Display() |
| | | { |
| | | bool isMyStart = manager.isMyStartBattleDetail; |
| | | BattleDetailMsg msg = manager.msg; |
| | | string battleName = manager.BattleDetailBattleName; |
| | | |
| | | if (msg == null) |
| | | return; |
| | | |
| | | if (isMyStart) |
| | | { |
| | | // 目前玩家主动发起的阵容一定是1,对方是 2, 如果是那种系统自动打的,一般1-左,2-右 |
| | | int myWinFaction = 1; |
| | | string myName = PlayerDatas.Instance.baseData.PlayerName; |
| | | string enemyName = manager.GetBattleDetailEnemyNameByMyStart(battleName); |
| | | if (battleName == BattleConst.TianziBillboradBattleField) |
| | | { |
| | | redName.text = myWinFaction == msg.winFaction ? enemyName : myName; |
| | | blueName.text = myWinFaction == msg.winFaction ? myName : enemyName; |
| | | } |
| | | else |
| | | { |
| | | redName.text = myWinFaction == msg.winFaction ? myName : enemyName; |
| | | blueName.text = myWinFaction == msg.winFaction ? enemyName : myName; |
| | | } |
| | | |
| | | } |
| | | |
| | | List<BattleDetailHeroInfo> redBattleDetailHeroInfoList = manager.GetHeroInfo(msg, isMyStart, battleName, true); |
| | | List<BattleDetailHeroInfo> blueBattleDetailHeroInfoList = manager.GetHeroInfo(msg, isMyStart, battleName, false); |
| | | DisplayDetail(redList, redBattleDetailHeroInfoList); |
| | | DisplayDetail(blueList, blueBattleDetailHeroInfoList); |
| | | } |
| | | |
| | | public void DisplayDetail(List<BattleDetailHeroInfoItem> teamItemList, List<BattleDetailHeroInfo> infoList) |
| | | { |
| | | int mvpIndex = GetMvpIndex(infoList); |
| | | GetMaxAttr(infoList, out ulong maxAtk, out ulong maxDef, out ulong maxCure); |
| | | |
| | | for (int i = 0; i < teamItemList.Count; i++) |
| | | { |
| | | if (i < infoList.Count) |
| | | { |
| | | teamItemList[i].SetActive(true); |
| | | teamItemList[i].Display(new BattleDetailHeroInfoItemData() |
| | | { |
| | | index = i, |
| | | mvpIndex = mvpIndex, |
| | | maxAtk = maxAtk, |
| | | maxDef = maxDef, |
| | | maxCure = maxCure, |
| | | info = infoList[i], |
| | | }); |
| | | } |
| | | else |
| | | { |
| | | teamItemList[i].SetActive(false); |
| | | } |
| | | } |
| | | } |
| | | |
| | | public int GetMvpIndex(List<BattleDetailHeroInfo> infos) |
| | | { |
| | | if (infos.IsNullOrEmpty()) |
| | | return -1; |
| | | int mvpIndex = -1; |
| | | ulong mvpScore = 0; |
| | | for (int i = 0; i < infos.Count; i++) |
| | | { |
| | | BattleDetailHeroInfo nowInfo = infos[i]; |
| | | ulong nowValue = nowInfo.AtkHurt + nowInfo.DefHurt + nowInfo.CureHP; |
| | | if (nowValue > mvpScore) |
| | | { |
| | | mvpIndex = i; |
| | | mvpScore = nowValue; |
| | | } |
| | | } |
| | | return mvpIndex; |
| | | } |
| | | |
| | | public void GetMaxAttr(List<BattleDetailHeroInfo> infos, out ulong maxAtk, out ulong maxDef, out ulong maxCure) |
| | | { |
| | | maxAtk = 0; |
| | | maxDef = 0; |
| | | maxCure = 0; |
| | | if (infos.IsNullOrEmpty()) |
| | | return; |
| | | |
| | | for (int i = 0; i < infos.Count; i++) |
| | | { |
| | | BattleDetailHeroInfo nowInfo = infos[i]; |
| | | if (nowInfo.AtkHurt > maxAtk) |
| | | maxAtk = nowInfo.AtkHurt; |
| | | if (nowInfo.DefHurt > maxDef) |
| | | maxDef = nowInfo.DefHurt; |
| | | if (nowInfo.CureHP > maxCure) |
| | | maxCure = nowInfo.CureHP; |
| | | } |
| | | } |
| | | } |
| | | public class BattleDetailHeroInfoItemData |
| | | { |
| | | public int index; |
| | | public int mvpIndex; |
| | | public ulong maxAtk; |
| | | public ulong maxDef; |
| | | public ulong maxCure; |
| | | public BattleDetailHeroInfo info; |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: f3d38bd1b83265f4bafa8bb7de20f856 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using Cysharp.Threading.Tasks; |
| | | using LitJson; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | |
| | | |
| | | [SerializeField] Button tipEquipBtn; |
| | | [SerializeField] Button tipHeroPosBtn; |
| | | [SerializeField] ButtonEx detailBtn; |
| | | string battleName = BattleConst.StoryBossBattleField; |
| | | |
| | | protected override void InitComponent() |
| | | { |
| | | tipEquipBtn.AddListener(() => |
| | |
| | | CloseWindow(); |
| | | UIManager.Instance.OpenWindow<HeroPosWin>(); |
| | | }); |
| | | |
| | | detailBtn.SetListener(() => |
| | | { |
| | | BattleSettlementManager.Instance.OpenBattleDetailWin(battleName); |
| | | }); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | |
| | | |
| | | } |
| | | |
| | | #region 战斗结果详情 |
| | | public BattleDetailMsg msg = new BattleDetailMsg(); |
| | | public string BattleDetailBattleName = string.Empty; |
| | | public string BattleDetailMyName = string.Empty; |
| | | public string BattleDetailEnemyName = string.Empty; |
| | | public bool isMyStartBattleDetail = false; // 是否是我方发起的战斗 |
| | | |
| | | // isMyStart 是否是我方发起的战斗 |
| | | public void OpenBattleDetailWin(string battleName, bool isMyStart = true) |
| | | { |
| | | if (UIManager.Instance.IsOpened<BattleDetailWin>()) |
| | | return; |
| | | |
| | | JsonData battleSettlement = GetBattleSettlement(battleName); |
| | | if (battleSettlement == null) |
| | | return; |
| | | |
| | | msg = ParserBattleDetail(battleSettlement); |
| | | if (msg == null) |
| | | return; |
| | | |
| | | BattleDetailBattleName = battleName; |
| | | this.isMyStartBattleDetail = isMyStart; |
| | | UIManager.Instance.OpenWindow<BattleDetailWin>(); |
| | | } |
| | | |
| | | //战斗结果详情界面获取 我方发起的战斗的中敌方名字 |
| | | public string GetBattleDetailEnemyNameByMyStart(string battleName) |
| | | { |
| | | string detailName = string.Empty; |
| | | BattleField battleField = BattleManager.Instance.GetActiveBattleFieldByName(battleName); |
| | | if (battleField == null) |
| | | return detailName; |
| | | |
| | | switch (battleName) |
| | | { |
| | | // 敌方名字是Boss名字 |
| | | case BattleConst.StoryBossBattleField: |
| | | case BattleConst.BoneBattleField: |
| | | case BattleConst.TianziBillboradBattleField: |
| | | BattleObject bossBattleObject = battleField.FindBoss(); |
| | | if (bossBattleObject == null || bossBattleObject.teamHero == null) |
| | | return detailName; |
| | | detailName = bossBattleObject.teamHero.name; |
| | | break; |
| | | // 敌方名字是对方玩家名字 |
| | | case BattleConst.ArenaBattleField: |
| | | if (!ArenaManager.Instance.TryGetPlayerInfo(ArenaManager.Instance.atkPlayerId, out ArenaMatchInfo info) || info == null) |
| | | return detailName; |
| | | detailName = info.PlayerName; |
| | | break; |
| | | } |
| | | return detailName; |
| | | } |
| | | |
| | | public BattleDetailMsg ParserBattleDetail(JsonData jsonMsg) |
| | | { |
| | | if (jsonMsg == null) |
| | | return null; |
| | | try |
| | | { |
| | | string jsonStr = jsonMsg.ToJson(); |
| | | BattleDetailMsg result = JsonMapper.ToObject<BattleDetailMsg>(jsonStr); |
| | | return result; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Debug.Log("解析战斗数据异常: " + ex.Message); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public List<BattleDetailHeroInfo> GetHeroInfo(BattleDetailMsg msg, bool isMyStart, string battleName, bool isWin) |
| | | { |
| | | if (msg == null || msg.statInfo.IsNullOrEmpty()) |
| | | return null; |
| | | |
| | | int winFaction = msg.winFaction; // 获胜阵营 |
| | | Dictionary<string, Dictionary<string, BattleDetailHeroInfo>> lineupInfo = new Dictionary<string, Dictionary<string, BattleDetailHeroInfo>>(); |
| | | string statInfoKey = string.Empty; |
| | | |
| | | if (isMyStart) |
| | | { |
| | | // 天子战场玩家不会输 |
| | | if (battleName == BattleConst.TianziBillboradBattleField) |
| | | { |
| | | statInfoKey = isWin ? msg.statInfo.Keys.FirstOrDefault(key => key != winFaction.ToString()) : winFaction.ToString(); |
| | | } |
| | | else |
| | | { |
| | | statInfoKey = isWin ? winFaction.ToString() : msg.statInfo.Keys.FirstOrDefault(key => key != winFaction.ToString()); |
| | | } |
| | | } |
| | | |
| | | if (!msg.statInfo.TryGetValue(statInfoKey, out lineupInfo) || lineupInfo.IsNullOrEmpty()) |
| | | return null; |
| | | var lineupInfoKeyList = lineupInfo.Keys.ToList(); |
| | | if (lineupInfoKeyList.IsNullOrEmpty()) |
| | | return null; |
| | | |
| | | // 目前只取第一个阵容的信息 |
| | | string key = lineupInfoKeyList[0]; |
| | | if (!lineupInfo.TryGetValue(key, out var heroInfoDict) || heroInfoDict.IsNullOrEmpty()) |
| | | return null; |
| | | |
| | | var heroInfoKeyList = heroInfoDict.Keys.ToList(); |
| | | heroInfoKeyList = heroInfoKeyList |
| | | .OrderBy(key => int.Parse(key)) // 将字符串键解析为整数后进行排序 |
| | | .ToList(); // 将排序后的结果转回 List<string> |
| | | |
| | | List<BattleDetailHeroInfo> res = new List<BattleDetailHeroInfo>(); |
| | | foreach (var heroInfoKey in heroInfoKeyList) |
| | | { |
| | | if (!heroInfoDict.TryGetValue(heroInfoKey, out var heroInfo)) |
| | | continue; |
| | | res.Add(heroInfo); |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | } |
| | | |
| | | public class BattleDetailMsg |
| | | { |
| | | public List<BattleDetailRewardItem> itemInfo; |
| | | |
| | | public int winFaction; |
| | | |
| | | // 对应 "statInfo" |
| | | // 结构:<阵营编号, <阵容编号, <站位编号, 武将数据>>> |
| | | // 注意:JSON中的键 "1", "2" 是字符串,所以字典 Key 用 string |
| | | public Dictionary<string, Dictionary<string, Dictionary<string, BattleDetailHeroInfo>>> statInfo; |
| | | } |
| | | public class BattleDetailHeroInfo |
| | | { |
| | | public int ObjID; // 实例ID |
| | | public int HeroID; // 玩家阵容武将ID |
| | | public int NPCID; // NPCID |
| | | public int LV; // 武将等级 |
| | | public int Star; // 武将星级 |
| | | public int Skin; // 武将皮肤ID |
| | | public ulong DefHurt; // 总承伤 |
| | | public ulong CureHP; // 总治疗 |
| | | public ulong AtkHurt; // 总输出 |
| | | public int Dead; // 是否阵亡 |
| | | } |
| | | |
| | | public class BattleDetailRewardItem |
| | | { |
| | | public int ItemID; |
| | | public int Count; |
| | | } |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using Cysharp.Threading.Tasks; |
| | | using LitJson; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | // 【战斗结算】 |
| | | // 当收到 // B4 20 回合制战斗状态 #tagMCTurnFightState State 为 4-结算,时,代表本场战斗已结束并结算 |
| | |
| | | { |
| | | |
| | | [SerializeField] ScrollerController scroller; |
| | | [SerializeField] ButtonEx detailBtn; |
| | | |
| | | string battleName = BattleConst.StoryBossBattleField; //绑死战场就不通用了根据情况修改 |
| | | protected override void InitComponent() |
| | | { |
| | | detailBtn.SetListener(() => |
| | | { |
| | | BattleSettlementManager.Instance.OpenBattleDetailWin(battleName); |
| | | }); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | scroller.OnRefreshCell += OnRefreshCell; |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using Cysharp.Threading.Tasks; |
| | | using LitJson; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | |
| | | [SerializeField] TextEx txtFuncName; |
| | | [SerializeField] Button tipEquipBtn; |
| | | [SerializeField] Button tipHeroPosBtn; |
| | | [SerializeField] ButtonEx detailBtn; |
| | | string battleName = BattleConst.BoneBattleField; |
| | | protected override void InitComponent() |
| | | { |
| | |
| | | CloseWindow(); |
| | | UIManager.Instance.OpenWindow<HeroPosWin>(); |
| | | }); |
| | | |
| | | detailBtn.SetListener(() => |
| | | { |
| | | BattleSettlementManager.Instance.OpenBattleDetailWin(battleName); |
| | | }); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | |
| | | |
| | | public class BoneBattleVictoryWin : UIBase |
| | | { |
| | | [SerializeField] ButtonEx detailBtn; |
| | | [SerializeField] TextEx txtFuncName; |
| | | [SerializeField] ScrollerController scroller; |
| | | |
| | | |
| | | string battleName = BattleConst.BoneBattleField; |
| | | |
| | | protected override void InitComponent() |
| | | { |
| | | detailBtn.SetListener(() => |
| | | { |
| | | BattleSettlementManager.Instance.OpenBattleDetailWin(battleName); |
| | | }); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | scroller.OnRefreshCell += OnRefreshCell; |
| | |
| | | { |
| | | [SerializeField] ScrollerController scroller; |
| | | [SerializeField] TextEx txtHunt; |
| | | [SerializeField] ButtonEx detailBtn; |
| | | bool isSweepVictory = false; |
| | | string battleName = BattleConst.TianziBillboradBattleField; |
| | | |
| | | protected override void InitComponent() |
| | | { |
| | | detailBtn.SetListener(() => |
| | | { |
| | | BattleSettlementManager.Instance.OpenBattleDetailWin(battleName); |
| | | }); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | base.OnPreOpen(); |