1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- using System.Collections.Generic;
- using ET;
- using FairyGUI;
- using UI.LuckyBox;
- using UnityEngine;
- namespace GFGGame
- {
- public class LuckyBoxNewCardView : BaseWindow
- {
- private UI_LuckyBoxNewCardUI _ui;
- // private List<int> _newCardList = new List<int>();
- // private List<ItemData> _newDressList = new List<ItemData>();
- private int _cardId;
- public override void Dispose()
- {
- if (_ui != null)
- {
- _ui.Dispose();
- _ui = null;
- }
- base.Dispose();
- }
- protected override void OnInit()
- {
- base.OnInit();
- packageName = UI_LuckyBoxNewCardUI.PACKAGE_NAME;
- _ui = UI_LuckyBoxNewCardUI.Create();
- this.viewCom = _ui.target;
- isfullScreen = true;
- _ui.m_loaBg.onClick.Add(OnClickBg);
- }
- protected override void AddEventListener()
- {
- base.AddEventListener();
- }
- protected override void OnShown()
- {
- base.OnShown();
- _cardId = (int)this.viewData;
- // _newCardList = new List<int>((this.viewData as object[])[0] as List<int>);
- updateView();
- }
- private void updateView()
- {
- ItemCfg cfg = ItemCfgArray.Instance.GetCfg(_cardId);
- _ui.m_loaBg.url = ResPathUtil.GetCardPath(cfg.res);
- }
- protected override void OnHide()
- {
- base.OnHide();
- }
- protected override void RemoveEventListener()
- {
- base.RemoveEventListener();
- }
- private void OnClickBg()
- {
- if (!GetSuitItemController.isAuto)
- {
- this.Hide();
- }
- }
- }
- }
|