ButtonEvenetL.cs 780 B

12345678910111213141516171819202122232425262728293031323334
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.EventSystems;
  5. public class ButtonEvenetL : BaseView
  6. {
  7. public InspectListPanel inspectPanle;
  8. public int buttonIndex = 0;
  9. public override void OnEnter(BaseEventData data)
  10. {
  11. if (InspectListPanel.taskIndex > 0)
  12. {
  13. buttonIndex = 1;
  14. inspectPanle.leftButton_show.gameObject.SetActive(true);
  15. }
  16. else
  17. {
  18. buttonIndex = 0;
  19. inspectPanle.leftButton_show.gameObject.SetActive(false);
  20. }
  21. }
  22. public override void OnExit(BaseEventData data)
  23. {
  24. buttonIndex = 0;
  25. inspectPanle.leftButton_show.gameObject.SetActive(false);
  26. }
  27. }