BreakthroughItemWidget.cs 966 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. namespace Fort23.Mono
  2. {
  3. [UIBinding(prefab = "BreakthroughItemWidget")]
  4. public partial class BreakthroughItemWidget : UIComponent
  5. {
  6. /// <summary>
  7. /// 1.选择丹药 2.其他道具
  8. /// </summary>
  9. private int type;
  10. private int itemId;
  11. private void Init()
  12. {
  13. }
  14. public override void AddEvent()
  15. {
  16. }
  17. public override void DelEvent()
  18. {
  19. }
  20. public override void AddButtonEvent()
  21. {
  22. Btn_Select.onClick.AddListener(() =>
  23. {
  24. //打开选择丹药界面
  25. if (type == 1)
  26. {
  27. SelectElixirPanel.OpenPanel();
  28. }
  29. else
  30. {
  31. }
  32. });
  33. }
  34. public void CustomInit(int type, int itemId)
  35. {
  36. this.type = type;
  37. this.itemId = itemId;
  38. }
  39. }
  40. }