LinePath.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.EventSystems;
  5. public enum LineDir {
  6. Out,
  7. In
  8. };
  9. public enum ZYTime
  10. {
  11. Before,
  12. After,
  13. };
  14. public class LinePath : MonoBehaviour,IPointerEnterHandler,IPointerExitHandler
  15. {
  16. public LineDir lineDir;
  17. public string startPos;
  18. public string endPos;
  19. public string linePathContent;
  20. public int manNum;
  21. public int homeNum;
  22. public int completeNum;
  23. public string dateTime;
  24. public void OnPointerEnter(PointerEventData eventData)
  25. {
  26. if (RKZYLayer.lineInfoStatic) {
  27. RKZYLayer.lineInfoStatic.SetData(this);
  28. RKZYLayer.lineInfoStatic.GetComponent<RectTransform>().anchoredPosition = this.GetComponent<RectTransform>().anchoredPosition;
  29. RKZYLayer.lineInfoStatic.linePaths.Add(this);
  30. }
  31. }
  32. public void OnPointerExit(PointerEventData eventData)
  33. {
  34. if (RKZYLayer.lineInfoStatic)
  35. {
  36. RKZYLayer.lineInfoStatic.linePaths.Remove(this);
  37. }
  38. }
  39. }