using System.Collections.Generic; using FairyGUI; using UI.DailyTask; using UnityEngine; namespace GFGGame { public class DailyTaskRewardView : BaseWindow { private UI_DailyTaskRewardUI _ui; private List _cfgs; public override void Dispose() { base.Dispose(); } protected override void OnInit() { base.OnInit(); _ui = UI_DailyTaskRewardUI.Create(); this.viewCom = _ui.target; this.viewCom.Center(); this.modal = true; viewAnimationType = EnumViewAnimationType.ZOOM_CENTER; _ui.m_list.itemRenderer = ListItemRender; } protected override void OnShown() { base.OnShown(); _cfgs = FieldDataManager.Instance.GetTaskCfgs(); _ui.m_list.numItems = _cfgs.Count; } protected override void OnHide() { base.OnHide(); } private void ListItemRender(int index, GObject obj) { UI_ListItem item = UI_ListItem.Proxy(obj); UI_ListItem.ClearProxy(); } } }