CurvedUIPointerEventData.cs 845 B

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. using System.Text;
  3. using UnityEngine;
  4. using UnityEngine.EventSystems;
  5. namespace CurvedUI
  6. {
  7. /// <summary>
  8. /// This class stores additional information that CurvedUI uses for its Pointer Events.
  9. /// Right now its only used to store the controller used to interact with canvas.
  10. /// </summary>
  11. public class CurvedUIPointerEventData : PointerEventData
  12. {
  13. public CurvedUIPointerEventData(EventSystem eventSystem)
  14. : base(eventSystem)
  15. {
  16. }
  17. public enum ControllerType
  18. {
  19. NONE = -1,
  20. VIVE = 0,
  21. }
  22. public GameObject Controller;
  23. /// <summary>
  24. /// Basically the position of user's finger on a touchpad. Goes from -1,-1 to 1,1
  25. /// </summary>
  26. public Vector2 TouchPadAxis = Vector2.zero;
  27. }
  28. }