| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- using System.Collections.Generic;
- using System.Linq;
- using FairyGUI;
- using UI.Studio;
- namespace GFGGame
- {
- //金属副本
- public class StudioMetalView : StudioBaseView
- {
- public override void Dispose()
- {
- base.Dispose();
- }
- protected override void OnInit()
- {
- base.OnInit();
- _ui.m_btnBack.onClick.Add(OnClickBtnBack);
- }
- protected override void OnShown()
- {
- GComponent com = UIPackage.CreateObject(UI_StudioUI.PACKAGE_NAME, "ComFabric").asCom;
- AddChildCom(com);
- StudioDataManager.Instance.VIEW_NAME = typeof(StudioMetalView).FullName;
- this._studioCfg = CommonDataManager.Tables.TblStudioCfg.DataList
- .Where(a => a.FunId == typeof(StudioMetalView).Name).ToList()[0];
- this.storyLevelCfgs = CommonDataManager.Tables.TblStoryLevelCfg.DataList
- .Where(a => a.Type == this._studioCfg.Type &&
- a.SubType == _studioCfg.SubType &&
- a.ChapterId == this._studioCfg.Id).ToList();
- list.numItems = this.storyLevelCfgs.Count;
- list.ScrollToView(curIndex);
- com.GetChild("loaBg").asLoader.url = ResPathUtil.GetBgImgPath("gzs_fb_bj");
- com.GetChild("Name").asLoader.url = "ui://Studio/gzs_fb_bt_jsxf";
- com.GetChild("btnChageLine").asLoader.url = ResPathUtil.GetCommonGameResPath("zsx_fl");
- base.OnShown();
- com.height = _ui.target.height;
- }
- protected override void OnHide()
- {
- base.OnHide();
- }
- private void OnClickBtnBack()
- {
- ViewManager.GoBackFrom(typeof(StudioMetalView).FullName);
- }
- }
- }
|