MousePointerEvent.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. using UnityEngine;
  2. using UnityEngine.EventSystems;
  3. namespace Rokid.UXR.Interaction
  4. {
  5. /// <summary>
  6. /// Triggered when the mouse enters
  7. /// </summary>
  8. public interface IMouseEnter
  9. {
  10. void OnMouseEnter();
  11. }
  12. /// <summary>
  13. /// Triggered when the mouse exits
  14. /// </summary>
  15. public interface IMouseExit
  16. {
  17. void OnMouseExit();
  18. }
  19. /// <summary>
  20. /// Triggered when mouse drag starts
  21. /// </summary>
  22. public interface IMouseBeginDrag
  23. {
  24. void OnMouseBeginDrag(PointerEventData eventData);
  25. }
  26. /// <summary>
  27. /// Triggered when the mouse drag ends
  28. /// </summary>
  29. public interface IMouseEndDrag
  30. {
  31. void OnMouseEndDrag();
  32. }
  33. /// <summary>
  34. /// Triggered when mouse dragging
  35. /// </summary>
  36. public interface IMouseDrag
  37. {
  38. void OnMouseRayDrag(Vector3 delta);
  39. }
  40. /// <summary>
  41. /// Triggered when mouse hovering
  42. /// </summary>
  43. public interface IMouseHover
  44. {
  45. void OnMouseHover();
  46. }
  47. /// <summary>
  48. /// Triggered when the mouse clicks
  49. /// </summary>
  50. public interface IMouseClick
  51. {
  52. void OnMouseClick();
  53. }
  54. }