| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- using FairyGUI;
- using UI.Arena;
- using UnityEngine;
- using System;
- using System.Collections.Generic;
- using cfg.GfgCfg;
- namespace GFGGame
- {
- public class ArenaLoadingView : BaseWindow
- {
- private UI_ArenaLoadingUI _ui;
- private EffectUI _effectUI1;
- public override void Dispose()
- {
- EffectUIPool.Recycle(_effectUI1);
- _effectUI1 = null;
- if (_ui != null)
- {
- _ui.Dispose();
- _ui = null;
- }
- base.Dispose();
- }
- protected override void OnInit()
- {
- base.OnInit();
- packageName = UI_ArenaLoadingUI.PACKAGE_NAME;
- _ui = UI_ArenaLoadingUI.Create();
- this.viewCom = _ui.target;
- isfullScreen = true;
- //isReturnView = true;
- EffectUIPool.CreateEffectUI(_ui.m_holder, "ui_dljm", "ui_dljm_jdt_tw",
- onComplete: (effect) =>
- {
- if (effect != null)
- {
- _effectUI1 = effect;
- }
- });
- }
- protected override void AddEventListener()
- {
- base.AddEventListener();
- }
- protected override void OnShown()
- {
- base.OnShown();
- string res = CommonDataManager.Tables.TblArenaOpenCfg.GetOrDefault(ArenaDataManager.Instance.SeasonId).Res;
- _ui.m_loaBg.url = ResPathUtil.GetBgImgPath(res);
- _ui.m_progressBar1.TweenValue(100, 1).OnComplete(Hide);
- List<TipsDescCfg> tipsArray = CommonDataManager.Tables.TblTipsDescCfg.DataList;
- System.Random rand = new System.Random();
- _ui.m_txtDescLeft.text = tipsArray[rand.Next(0, tipsArray.Count)].Text;
- }
- protected override void OnHide()
- {
- base.OnHide();
- _ui.m_progressBar1.value = 0;
- }
- protected override void RemoveEventListener()
- {
- base.RemoveEventListener();
- }
- }
- }
|