| System/FairyAu/FairyModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/HappyXB/BestXBWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/HappyXB/HappyXBModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/HappyXB/RuneXBWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/HappyXB/XBItemCell.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
System/FairyAu/FairyModel.cs
@@ -607,6 +607,7 @@ page = 0; OnSearchPageList(); AddFairyRed = LocalSave.GetBool(StringUtility.Contact(FairyKey, PlayerDatas.Instance.PlayerId)); UpdateFairyInfo(); } #endregion System/HappyXB/BestXBWin.cs
@@ -54,7 +54,10 @@ [SerializeField] float maxTimeInter = 0.6f; [Header("最小时间间隔")] [SerializeField] float minTimeInter = 0.005f; [Header("闪烁次数")] [SerializeField] public int flashingTimes = 10; [Header("单次闪烁时间")] [SerializeField] public float flashingTime = 0.2f; [Header("得到物品停留时间")] [SerializeField] float stopTime = 2f; [Header("寻宝得到物品动画时间")] @@ -434,6 +437,14 @@ { if (cycle > cycleTimes) { for (int i = 0; i < xbItemlist.Count; i++) { xbItemlist[i].CheckToFlashing(1,curSelectIndex); } for (int i = 0; i < xbItemlist.Count; i++) { xbItemlist[i].RefreshSelectIcon(curSelectIndex); } if (isXBMany) { if (targetIndex >= targetIndexs.Count - 1) @@ -495,7 +506,16 @@ IEnumerator PlaySelectItemAni(bool isEndXB,int targetIndex = 0,int curSelectIndex = 0) { yield return new WaitForSeconds(stopTime); XBGetItemConfig getItemConfig = XBModel.GetXBItemConfigByType(1); if(getItemConfig != null && getItemConfig.LuckyGridNum == curSelectIndex) { yield return new WaitForSeconds(flashingTime*flashingTimes); } else { yield return new WaitForSeconds(stopTime); } if(isEndXB) { if(targetIndexs.Count > 1) System/HappyXB/HappyXBModel.cs
@@ -314,6 +314,28 @@ return dict; } public XBGetItemConfig GetXBItemConfigByType(int type) { int lv = 0; List<XBGetItemConfig> configlist = null; xbTypeItemDict.TryGetValue(type, out configlist); if (configlist != null) { for (int i = configlist.Count - 1; i > -1; i--) { if (PlayerDatas.Instance.baseData.LV >= configlist[i].MinLV) { lv = configlist[i].MinLV; break; } } } XBGetItemConfig xbItemConfig = null; string key = StringUtility.Contact(type, lv); xbGetItemDict.TryGetValue(key,out xbItemConfig); return xbItemConfig; } #region 处理服务端数据 public event Action RefreshXBTypeInfoAct; public event Action RefreshXBResultAct; System/HappyXB/RuneXBWin.cs
@@ -55,6 +55,11 @@ [SerializeField] float maxTimeInter = 0.6f; [Header("最小时间间隔")] [SerializeField] float minTimeInter = 0.005f; [Header("闪烁次数")] [SerializeField] public int flashingTimes = 10; [Header("单次闪烁时间")] [SerializeField] public float flashingTime = 0.2f; [Header("得到物品停留时间")] [SerializeField] float stopTime = 0.5f; [Header("寻宝得到物品动画时间")] @@ -444,6 +449,11 @@ { if (cycle > cycleTimes) { for (int i = 0; i < xbItemlist.Count; i++) { xbItemlist[i].CheckToFlashing(2, curSelectIndex); } if (isXBMany) { if (targetIndex >= targetIndexs.Count - 1) @@ -503,7 +513,16 @@ IEnumerator PlaySelectItemAni(bool isEndXB, int targetIndex = 0, int curSelectIndex = 0) { yield return new WaitForSeconds(stopTime); XBGetItemConfig getItemConfig = XBModel.GetXBItemConfigByType(2); if (getItemConfig != null && getItemConfig.LuckyGridNum == curSelectIndex) { yield return new WaitForSeconds(flashingTime * flashingTimes); } else { yield return new WaitForSeconds(stopTime); } if (isEndXB) { if (targetIndexs.Count > 1) System/HappyXB/XBItemCell.cs
@@ -2,6 +2,7 @@ using UnityEngine.UI; using TableConfig; using System.Collections.Generic; using System.Collections; namespace Snxxz.UI { @@ -12,6 +13,7 @@ [SerializeField] Text nameText; ItemTipsModel itemTips { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } } HappyXBModel XBModel { get { return ModelCenter.Instance.GetModel<HappyXBModel>(); } } int xbIndex = 0; public void SetModel(int itemId,int count,int index) @@ -45,5 +47,53 @@ selectIcon.SetActive(false); } } public void CheckToFlashing(int xbType, int curSelect) { if (curSelect != xbIndex) return; XBGetItemConfig xbItemConfig = XBModel.GetXBItemConfigByType(xbType); if (xbItemConfig == null || xbItemConfig.LuckyGridNum != xbIndex) return; StartCoroutine(BestItemFlashing(xbType)); } IEnumerator BestItemFlashing(int xbType) { int num = 0; BestXBWin bestXB = null; RuneXBWin runeXB = null; switch (xbType) { case 1: bestXB = WindowCenter.Instance.Get<BestXBWin>(); break; case 2: runeXB = WindowCenter.Instance.Get<RuneXBWin>(); break; } int flashingTimes = 0; float flashingTime = 0; if(bestXB != null) { flashingTimes = bestXB.flashingTimes; flashingTime = bestXB.flashingTime; } else if(runeXB != null) { flashingTimes = runeXB.flashingTimes; flashingTime = runeXB.flashingTime; } while (true) { selectIcon.SetActive(!selectIcon.activeInHierarchy); num += 1; if (num >= flashingTimes) { break; } yield return new WaitForSeconds(flashingTime); } } } }