ButtonEvenetR.cs 842 B

1234567891011121314151617181920212223242526272829303132333435
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.EventSystems;
  5. public class ButtonEvenetR : BaseView
  6. {
  7. // Use this for initialization
  8. public InspectListPanel inspectPanle;
  9. public int buttonIndex = 0;
  10. public override void OnEnter(BaseEventData data)
  11. {
  12. if (InspectListPanel.taskIndex < inspectPanle.taskList.Count - 1)
  13. {
  14. buttonIndex = 1;
  15. inspectPanle.rightButton_show.gameObject.SetActive(true);
  16. }
  17. else
  18. {
  19. buttonIndex = 0;
  20. inspectPanle.rightButton_show.gameObject.SetActive(false);
  21. }
  22. }
  23. public override void OnExit(BaseEventData data)
  24. {
  25. buttonIndex = 0;
  26. inspectPanle.rightButton_show.gameObject.SetActive(false);
  27. }
  28. }