StudioMetalView.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using System.Collections.Generic;
  2. using FairyGUI;
  3. using UI.Studio;
  4. namespace GFGGame
  5. {
  6. //金属副本
  7. public class StudioMetalView : StudioBaseView
  8. {
  9. public override void Dispose()
  10. {
  11. base.Dispose();
  12. }
  13. protected override void OnInit()
  14. {
  15. base.OnInit();
  16. _ui.m_btnBack.onClick.Add(OnClickBtnBack);
  17. }
  18. protected override void OnShown()
  19. {
  20. GComponent com = UIPackage.CreateObject(UI_StudioUI.PACKAGE_NAME, "ComFabric").asCom;
  21. AddChildCom(com);
  22. StudioDataManager.Instance.VIEW_NAME = typeof(StudioMetalView).FullName;
  23. this.studioCfg = StudioCfgArray.Instance.GetCfgsByfunId(typeof(StudioMetalView).Name)[0];
  24. this.studioData = StudioDataManager.Instance.GetStudioDataById(this.studioCfg.id);
  25. this.storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(this.studioCfg.type, this.studioCfg.subType, this.studioCfg.id);
  26. list.numItems = this.storyLevelCfgs.Count;
  27. list.ScrollToView(curIndex);
  28. base.OnShown();
  29. }
  30. protected override void OnHide()
  31. {
  32. base.OnHide();
  33. }
  34. private void OnClickBtnBack()
  35. {
  36. ViewManager.GoBackFrom(typeof(StudioMetalView).FullName);
  37. }
  38. }
  39. }