DaoYouWidgetItem.cs 958 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using GameLogic.Bag;
  2. namespace Fort23.Mono
  3. {
  4. [UIBinding(prefab = "DaoYouWidgetItem" )]
  5. public partial class DaoYouWidgetItem : UIComponent
  6. {
  7. private void Init()
  8. {
  9. }
  10. public override void AddEvent()
  11. {
  12. }
  13. public override void DelEvent()
  14. {
  15. }
  16. public override void AddButtonEvent()
  17. {
  18. }
  19. public async void CustomInit(ItemInfo itemInfo)
  20. {
  21. WidgetItem widgetItem = await UIManager.Instance.CreateGComponentForObject<WidgetItem>(WidgetItemGam, null);
  22. widgetItem.InitWidget(itemInfo);
  23. }
  24. public void Award()
  25. {
  26. Icon_Award.gameObject.SetActive(true);
  27. Icon_Gou.gameObject.SetActive(false);
  28. }
  29. public void ShowGou()
  30. {
  31. Icon_Award.gameObject.SetActive(false);
  32. Icon_Gou.gameObject.SetActive(true);
  33. }
  34. public void ColsePool()
  35. {
  36. Icon_Award.gameObject.SetActive(false);
  37. Icon_Gou.gameObject.SetActive(false);
  38. }
  39. public override void DormancyObj()
  40. {
  41. ColsePool();
  42. base.DormancyObj();
  43. }
  44. }
  45. }