1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- /// #pkgName FGUI包名
- /// #panelName UIPanel名字
- /// #UIName = $"{#pkgName}{#panelName}" UIKey名字
- /// 该脚本由模板创建
- /// created by cb 2024
- using System.Collections.Generic;
- using FairyGUI;
- using FL.Data;
- using XGame.Database;
- using XGame.Framework.UI;
- namespace FL.FGUI
- {
- /// <summary>
- /// UI逻辑处理类
- /// </summary>
- /// <typeparam name=""></typeparam>
- public partial class PartnerBookAddDetailPanelCtrl : UIController<PartnerBookAddDetailPanelVM>
- {
- protected override void OnEnable(object intent)
- {
- AddUIListenres();
- _type = (int)intent;
- }
- protected override void OnDisable()
- {
- RemoveUIListenres();
- }
- #region UI事件
- private void AddUIListenres() { }
- private void RemoveUIListenres() { }
- #endregion
- private int _type;
- private void ShowUI()
- {
- var addMap = new Dictionary<int, int>();
- foreach (var item in PartnersData.Instance.JibanMap)
- {
- var table = collect_rewardTableRepo.Get(item.Key);
- if (table == null)
- continue;
- var collectTable = collectTableRepo.Get(table.CollectId);
- XGame.Framework.Assert.IsNotNull(collectTable, $"羁绊不存在,id{table.CollectId}");
- if (collectTable.Type != _type) continue;
- //for(int i=0;i < table.Attribute.Length, i += 2)
- //{
- // if (addMap.TryGetValue(table.Attribute[i], out var add))
- // {
- // addMap.Remove(table.Attribute[i]);
- // }
- // addMap.Add(table.Attribute[i], add + table.Attribute[i+1]);
- //}
- }
- var list = new List<PartnerBookAttrTextParam>();
- foreach (var item in addMap)
- {
- list.Add(new PartnerBookAttrTextParam() { AttrId = item.Key, Val = item.Value });
- }
- VM.List.BindDatas(list);
- }
- }
- }
|