SuitRenewFinishView.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using FairyGUI;
  2. using UI.ClothingFoster;
  3. namespace GFGGame
  4. {
  5. public class SuitRenewFinishView : BaseWindow
  6. {
  7. private UI_SuitRenewFinishUI _ui;
  8. private int _suitId;
  9. public override void Dispose()
  10. {
  11. base.Dispose();
  12. }
  13. protected override void OnInit()
  14. {
  15. base.OnInit();
  16. packageName = UI_SuitRenewFinishUI.PACKAGE_NAME;
  17. _ui = UI_SuitRenewFinishUI.Create();
  18. this.viewCom = _ui.target;
  19. this.viewCom.Center();
  20. this.modal = true;
  21. // viewAnimationType = EnumViewAnimationType.ZOOM_CENTER;
  22. }
  23. protected override void OnShown()
  24. {
  25. base.OnShown();
  26. _suitId = (int)this.viewData;
  27. int suitrarity = SuitCfgArray.Instance.GetCfg(_suitId).rarity;
  28. SuitRenewCfg renewCfg = SuitRenewCfgArray.Instance.GetCfg(suitrarity);
  29. _ui.m_txtProperty.text = string.Format("套装所有部件属性+{0}%", renewCfg.addition * 100 / 10000);
  30. }
  31. protected override void OnHide()
  32. {
  33. base.OnHide();
  34. SuitFosterListCfg cfg = SuitFosterListCfgArray.Instance.GetCfg(_suitId);
  35. ViewManager.Show<RewardView>(ItemUtil.CreateItemDataList(cfg.renewRewardsArr));
  36. }
  37. }
  38. }