1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- using System.Collections.Generic;
- using System.Linq;
- using Excel2Json;
- using Fort23.Core;
- using Fort23.UTool;
- using GameLogic.Combat.CombatTool;
- using UnityEngine;
- namespace Fort23.Mono
- {
- [UIBinding(prefab = "TowerPanel")]
- public partial class TowerPanel : UIPanel, IScrollListContent
- {
- List<TowerInfoConfig> towerInfoConfigps;
- private void Init()
- {
- }
- protected override void AddEvent()
- {
- }
- protected override void DelEvent()
- {
- }
- public override void AddButtonEvent()
- {
- }
- public override CTask<bool> AsyncInit(object[] uiData)
- {
- int towerId = (int)uiData[0];
- TowerConfig towerConfig = ConfigComponent.Instance.Get<TowerConfig>(towerId);
- var configs = ConfigComponent.Instance.GetAll<TowerInfoConfig>();
- towerInfoConfigps = configs.Where(t => t.groupId == towerConfig.towerinfoIdGroup).ToList();
- return base.AsyncInit(uiData);
- }
- public static async CTask OpenPanel()
- {
- TowerPanel towerPanel = await UIManager.Instance.LoadAndOpenPanel<TowerPanel>(null);
- }
- public CTask<IScorllListWidget> GetIScorllListWidget(int index, RectTransform root)
- {
- int currInsex = index;
- if (currInsex < 0 || currInsex >= towerInfoConfigps.Count)
- {
- return null;
- }
- // BigSecretAreaWidget woc1 =
- // await UIManager.Instance.CreateGComponent<BigSecretAreaWidget>(null, ContentRoot);
- // woc1.CustomInit(bigSecretRealmBattleConfigs[currInsex], Onclick);
- return null;
- }
- public void HindIScorllListWidget(IScorllListWidget widget)
- {
- UIManager.Instance.DormancyGComponent(widget as UIComponent);
- }
- }
- }
|