StudioMetalView.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. _ui.m_c1.selectedIndex = 0;
  21. this.studioCfg = StudioCfgArray.Instance.GetCfgs(typeof(StudioMetalView).Name)[0];
  22. this.studioData = StudioDataManager.Instance.GetStudioDataById(this.studioCfg.id);
  23. this.storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgs(this.studioCfg.type, this.studioCfg.subType, this.studioCfg.id);
  24. _ui.m_list.numItems = this.storyLevelCfgs.Length;
  25. base.OnShown();
  26. }
  27. protected override void OnHide()
  28. {
  29. base.OnHide();
  30. }
  31. private void OnClickBtnBack()
  32. {
  33. ViewManager.GoBackFrom(typeof(StudioMetalView).FullName);
  34. }
  35. }
  36. }