| System/Dungeon/DungeonAncientKingWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Dungeon/DungeonAncientKingWin.cs.meta | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Dungeon/DungeonAncientTargetWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Dungeon/DungeonFightWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/GeneralConfig/GeneralConfig.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
System/Dungeon/DungeonAncientKingWin.cs
New file @@ -0,0 +1,93 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Thursday, September 27, 2018 //-------------------------------------------------------- using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; namespace Snxxz.UI { public class DungeonAncientKingWin : Window { [SerializeField] Text m_AncientKingName; [SerializeField] Text m_AncientKingPoint; [SerializeField] ItemCell[] m_Items; [SerializeField] Button m_Close; DungeonModel m_Model; DungeonModel model { get { return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<DungeonModel>()); } } #region Built-in protected override void BindController() { } protected override void AddListeners() { m_Close.onClick.AddListener(CloseClick); } protected override void OnPreOpen() { model.updateMissionEvent -= UpdateTargets; UpdateTargets(); DisplayAward(); } protected override void OnAfterOpen() { } protected override void OnPreClose() { model.updateMissionEvent -= UpdateTargets; } protected override void OnAfterClose() { } #endregion private void UpdateTargets() { var _help = model.mission; m_AncientKingName.text = _help.topName; m_AncientKingPoint.text = UIHelper.ReplaceLargeNum(_help.topScore); } private void DisplayAward() { var awards = GeneralConfig.Instance.ancientKingAwards; for (int i = 0; i < m_Items.Length; i++) { m_Items[i].cellBtn.RemoveAllListeners(); if (i < awards.Count) { var award = awards[i]; m_Items[i].gameObject.SetActive(true); ItemCellModel itemCellModel = new ItemCellModel(award.id, true, (ulong)award.count, award.bind ? 1 : 0); m_Items[i].Init(itemCellModel); m_Items[i].cellBtn.AddListener(() => { ItemAttrData itemAttrData = new ItemAttrData(award.id, true, (ulong)award.count, -1, award.bind ? 1 : 0); ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData); }); } else { m_Items[i].gameObject.SetActive(false); } } } } } System/Dungeon/DungeonAncientKingWin.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 174d70b8ee292354fb10efc54511ffb9 timeCreated: 1538034810 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/Dungeon/DungeonAncientTargetWin.cs
@@ -1,55 +1,55 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; namespace Snxxz.UI { public class DungeonAncientTargetWin : Window { [SerializeField] List<Text> m_DungeonTargets; [SerializeField] DungeonTargetBehaviour m_DungeonTargetBehaviour; DungeonModel m_Model; DungeonModel model { get { return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<DungeonModel>()); } } protected override void AddListeners() { } protected override void BindController() { } protected override void OnAfterClose() { } protected override void OnAfterOpen() { } protected override void OnPreClose() { model.updateMissionEvent -= UpdateTargets; } protected override void OnPreOpen() { model.updateMissionEvent += UpdateTargets; m_DungeonTargetBehaviour.Init(31160); UpdateTargets(); } private void UpdateTargets() { var _help = model.mission; m_DungeonTargets[0].text = _help.topName; m_DungeonTargets[1].text = UIHelper.ReplaceLargeNum(_help.topScore); } } } using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; namespace Snxxz.UI { public class DungeonAncientTargetWin : Window { //[SerializeField] List<Text> m_DungeonTargets; [SerializeField] DungeonTargetBehaviour m_DungeonTargetBehaviour; DungeonModel m_Model; DungeonModel model { get { return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<DungeonModel>()); } } protected override void AddListeners() { } protected override void BindController() { } protected override void OnAfterClose() { } protected override void OnAfterOpen() { } protected override void OnPreClose() { //model.updateMissionEvent -= UpdateTargets; } protected override void OnPreOpen() { //model.updateMissionEvent += UpdateTargets; m_DungeonTargetBehaviour.Init(31160); //UpdateTargets(); } private void UpdateTargets() { //var _help = model.mission; //m_DungeonTargets[0].text = _help.topName; //m_DungeonTargets[1].text = UIHelper.ReplaceLargeNum(_help.topScore); } } } System/Dungeon/DungeonFightWin.cs
@@ -27,6 +27,7 @@ [SerializeField] RectTransform m_ContainerResPoint; [SerializeField] RectTransform m_ContainerAncient; [SerializeField] Button m_AncientBtn; [SerializeField] Button m_AncientKing; [SerializeField] DungeonItemCollect m_ItemCollect; [SerializeField] DungeonGuardSkyBehaviour m_GuardSky; [SerializeField] DungeonBossBriefInfoContainer m_BossInfosContainer; @@ -55,6 +56,7 @@ { m_ExitDungeon.AddListener(ExitDungeon); m_AncientBtn.onClick.AddListener(OnAncientBtn); m_AncientKing.onClick.AddListener(AncientKing); } protected override void OnPreOpen() @@ -320,6 +322,18 @@ } } private void AncientKing() { if (WindowCenter.Instance.IsOpen<DungeonAncientKingWin>()) { WindowCenter.Instance.CloseImmediately<DungeonAncientKingWin>(); } else { WindowCenter.Instance.Open<DungeonAncientKingWin>(); } } private void UpdateDungeonExitTime() { if (existSurplusTime > 0f) System/GeneralConfig/GeneralConfig.cs
@@ -5,6 +5,7 @@ using System; using System.Text.RegularExpressions; using System.Linq; using Snxxz.UI; public class GeneralConfig : Singleton<GeneralConfig> { @@ -140,6 +141,8 @@ public string teamWorldCall; public int teamWorldCallInviteCount; public List<Item> ancientKingAwards = new List<Item>(); public void Init() { @@ -492,6 +495,21 @@ teamWorldCall = GetInputString("TeamWorldCall"); teamWorldCallInviteCount = GetInt("TeamWorldCall", 2); var ancientKingAwradConfig = Config.Instance.Get<FuncConfigConfig>("ElderBattlefieldTopAward"); if (ancientKingAwradConfig != null) { var itemArray = LitJson.JsonMapper.ToObject<int[][]>(ancientKingAwradConfig.Numerical1); for (int k = 0; k < itemArray.Length; k++) { ancientKingAwards.Add(new Item() { id = itemArray[k][0], count = itemArray[k][1], bind = itemArray[k][2] == 1, }); } } } catch (Exception ex) {