123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- using System;
- using System.Collections.Generic;
- using ET;
- using FairyGUI;
- using UI.MatchingCompetition;
- using UnityEngine;
- namespace GFGGame
- {
- class MatchingCompetitionRuleTipsView : BaseWindow
- {
- private UI_MatchingCompetitionRuleTips _ui;
- private int Season = 1;
- public override void Dispose()
- {
- if (_ui != null)
- {
- _ui.Dispose();
- }
- _ui = null;
- base.Dispose();
- }
- protected override void OnInit()
- {
- base.OnInit();
- packageName = UI_MatchingCompetitionRuleTips.PACKAGE_NAME;
- _ui = UI_MatchingCompetitionRuleTips.Create();
- this.viewCom = _ui.target;
- modal = true;
- this.viewCom.Center();
- viewAnimationType = EnumViewAnimationType.ZOOM_CENTER;
- _ui.m_rewardList.itemRenderer = RewardItemRender;
- }
- protected override void AddEventListener()
- {
- base.AddEventListener();
- }
- protected override void OnShown()
- {
- base.OnShown();
- Season = MatchingCompetitionDataManager.Instance.MatchingCompetitionSeason;
- }
- protected override void OnHide()
- {
- base.OnHide();
- }
- protected override void RemoveEventListener()
- {
- base.RemoveEventListener();
- }
- private void RewardItemRender(int index, GObject obj)
- {
- UI_MatchingCompetitionRewardItem item = UI_MatchingCompetitionRewardItem.Proxy(obj);
- item.m_rankIndex.text = (index + 1).ToString();
- if (item.m_rewardList.data == null)
- {
- item.m_rewardList.itemRenderer = SpecialRewardRender;
- }
- //item.m_rewardList.data =
- //item.m_rewardList.numItems =
- UI_MatchingCompetitionRewardItem.ProxyEnd();
- }
- private static void SpecialRewardRender(int index, GObject obj)
- {
- var itemInfo = (int[])obj.parent.data;
- var itemData = ItemUtil.createItemData(itemInfo);
- var itemView = new ItemView(obj as GComponent);
- obj.data ??= itemView;
- itemView.SetData(itemData);
- itemView.ChangeTxtCountStyle();
- }
- }
- }
|