123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- using System;
- using System.Collections.Generic;
- using ET;
- using FairyGUI;
- using UI.MatchingCompetition;
- using UnityEngine;
- namespace GFGGame
- {
- //搭配赛集合期间
- class MatchingCompetitionGatheringView : BaseWindow
- {
- private UI_MatchingCompetitionGatheringUI _ui;
- private ValueBarController _valueBarController;
- private int SuitID;
- private EffectUI _effectUI1;
- public override void Dispose()
- {
- EffectUIPool.Recycle(_effectUI1);
- _effectUI1 = null;
- if (_valueBarController != null)
- {
- _valueBarController.Dispose();
- _valueBarController = null;
- }
- if (_ui != null)
- {
- _ui.Dispose();
- }
- _ui = null;
- base.Dispose();
- }
- protected override void OnInit()
- {
- base.OnInit();
- packageName = UI_MatchingCompetitionGatheringUI.PACKAGE_NAME;
- _ui = UI_MatchingCompetitionGatheringUI.Create();
- this.viewCom = _ui.target;
- isReturnView = true;
- isfullScreen = true;
- _ui.m_BtnBack.onClick.Add(OnClickBtnBack);
- _ui.m_btnUploadWorks.onClick.Add(OnClickBtnUpload);
- _ui.m_btnShop.onClick.Add(OnClickBtnShop);
- _ui.m_ruleBtn.onClick.Add(MatchingCompetitionDataManager.Instance.OnClickBtnRule);
- }
- protected override void AddEventListener()
- {
- base.AddEventListener();
- }
- protected override void OnShown()
- {
- base.OnShown();
- _ui.m_bg.url = ResPathUtil.GetBgImgPath("gzs_fb_bj");
- _ui.m_c1.selectedIndex = 0;
- SuitID = 201030;
- UpdateView();
- Timers.inst.AddUpdate(UpdateTime);
- }
- protected override void OnHide()
- {
- DressUpObjUI dressUpObjUI = _ui.m_suitShow.data as DressUpObjUI;
- if (dressUpObjUI != null)
- {
- dressUpObjUI.Dispose();
- }
- _ui.m_suitShow.data = null;
- base.OnHide();
- Timers.inst.Remove(UpdateTime);
- }
- protected override void RemoveEventListener()
- {
- base.RemoveEventListener();
- }
- private void UpdateView()
- {
- if (true)
- {
- DressUpObjUI dressUpObjUI;
- if (_ui.m_suitShow.data == null)
- {
- _ui.m_suitShow.data = new DressUpObjUI("SceneSuitFoster");
- }
- bool showAction = SuitCfgArray.Instance.CheckSuitHasAction(SuitID) && DressUpMenuSuitDataManager.CheckSuitHasActionRes(SuitID);
- dressUpObjUI = _ui.m_suitShow.data as DressUpObjUI;
- dressUpObjUI.ResetSceneObj(100, false, true, null, false);
- dressUpObjUI.dressUpObj.PutOnSuitCfg(SuitID, showAction, new int[] { ConstDressUpItemType.BEI_JING }, false, false);
- dressUpObjUI.UpdateWrapper(_ui.m_suitShow);
- }
- }
- private void UpdateTime(object param = null)
- {
- }
- private void OnClickBtnBack()
- {
- ViewManager.GoBackFrom(typeof(MatchingCompetitionGatheringView).FullName);
- }
- private void OnClickBtnUpload()
- {
- ViewManager.Show<DressUpView>(2, false);
- }
- private void OnClickBtnShop()
- {
- ViewManager.Show<MatchingCompetitionUpLoadView>();
- //ViewManager.Show<StoreView>(new object[] { ConstStoreTabId.STORE_GIFT_BAG, ConstStoreSubId.STORE_GIFT_BAG_ACTIVITY });
- }
- }
- }
|