| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 | 
							- using ET;
 
- using FairyGUI;
 
- using Hutool;
 
- using System.Collections.Generic;
 
- using UI.League;
 
- using UnityEngine;
 
- namespace GFGGame
 
- {
 
-     public class LeagueTeaPartyShowView : BaseWindow
 
-     {
 
-         private UI_LeagueTeaPartyShowUI _ui;
 
-         private List<UI_comTeaPartyOverItem> teaPartyOverItemList = new List<UI_comTeaPartyOverItem>();
 
-         private List<TeapartyRoleCfg> teapartyRoleCfg;
 
-         private int timeIndex = 3;  //定时器时间计算
 
-         public override void Dispose()
 
-         {
 
-             if (_ui != null)
 
-             {
 
-                 _ui.Dispose();
 
-                 _ui = null;
 
-             }
 
-             base.Dispose();
 
-         }
 
-         protected override void OnInit()
 
-         {
 
-             base.OnInit();
 
-             packageName = UI_LeagueTeaPartyShowUI.PACKAGE_NAME;
 
-             _ui = UI_LeagueTeaPartyShowUI.Create();
 
-             this.viewCom = _ui.target;
 
-             isfullScreen = true;
 
-             _ui.m_loaBg.url = ResPathUtil.GetDressUpPath("chahuibg");
 
-             _ui.m_btnBack.onClick.Add(OnBtnBackClick);
 
-             teaPartyOverItemList.Add(_ui.m_TeaPartyOverItem1);
 
-             teaPartyOverItemList.Add(_ui.m_TeaPartyOverItem2);
 
-             teaPartyOverItemList.Add(_ui.m_TeaPartyOverItem3);
 
-             teaPartyOverItemList.Add(_ui.m_TeaPartyOverItem4);
 
-             teaPartyOverItemList.Add(_ui.m_TeaPartyOverItem5);
 
-             teaPartyOverItemList.Add(_ui.m_TeaPartyOverItem6);
 
-             teapartyRoleCfg = TeapartyRoleCfgArray.Instance.GetCfgsByid(1); //LeagueDataManager.Instance.TeaPartyId
 
-         }
 
-         protected override void AddEventListener()
 
-         {
 
-             base.AddEventListener();
 
-         }
 
-         protected override void OnShown()
 
-         {
 
-             base.OnShown();
 
-             timeIndex = 3;
 
-             _ui.m_txtCountdown.text = string.Format("将在[color=#FF6600]{0}s[/color]后进入下一阶段", timeIndex);
 
-             GetRoleContainerInfos();
 
-             Timers.inst.Add(1, 3, UpdateTime);
 
-         }
 
-         protected override void OnHide()
 
-         {
 
-             base.OnHide();
 
-             Timers.inst.Remove(UpdateTime);
 
-         }
 
-         protected override void RemoveEventListener()
 
-         {
 
-             base.RemoveEventListener();
 
-         }
 
-         private async void GetRoleContainerInfos()
 
-         {
 
-             bool result = await LeagueSproxy.GetRoleContainerInfos(RoleDataManager.roleId);
 
-             if (result)
 
-             {
 
-                 var roleContainerList = LeagueDataManager.Instance.RoleContainerList;
 
-                 for (int index = 0; index < teaPartyOverItemList.Count; index++)
 
-                 {
 
-                     teaPartyOverItemList[index].m_txtRoleName.text = teapartyRoleCfg[index].name;
 
-                     teaPartyOverItemList[index].m_txtGuildName.text = roleContainerList[index].MaxScoreRoleName;
 
-                 }
 
-             }
 
-         }
 
-         private void OnBtnBackClick()
 
-         {
 
-             ViewManager.GoBackFrom(typeof(LeagueTeaPartyShowView).FullName);
 
-         }
 
-         private void openNextView()
 
-         {
 
-             var openCfg = TeapartyOpenCfgArray.Instance.GetCfg(LeagueDataManager.Instance.TeaPartyId);
 
-             string stroyStartID = openCfg.storyId.ToString();
 
-             ViewManager.Show<StoryDialogView>(new object[] { stroyStartID, false, new OnCompleteStoryDialogCall(OnCompletePriorStoryDialog), null, true }, null, true);
 
-         }
 
-         private static void OnCompletePriorStoryDialog(bool isSkip, object param)
 
-         {
 
-             ViewManager.Show<LeagueTeaPartyOverView>(null, new object[] { typeof(LeagueView).FullName, null });
 
-         }
 
-         private void UpdateTime(object param)
 
-         {
 
-             timeIndex -= 1;
 
-             _ui.m_txtCountdown.text = string.Format("将在[color=#FF6600]{0}s[/color]后进入下一阶段", timeIndex);
 
-             if (timeIndex <= 0) {
 
-                 openNextView();
 
-                 Timers.inst.Remove(UpdateTime);
 
-             }
 
-         }
 
-     }
 
- }
 
 
  |