UICustomDrag.cs 830 B

1234567891011121314151617181920212223242526272829303132333435
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.EventSystems;
  5. namespace MetaClient
  6. {
  7. public class UICustomDrag : MonoBehaviour, IDragHandler, IEndDragHandler, IBeginDragHandler
  8. {
  9. // Start is called before the first frame update
  10. void Start()
  11. {
  12. }
  13. public void OnDrag(PointerEventData eventData)
  14. {
  15. //CustomManager.Instance
  16. Debug.Log(eventData.delta.x + "");
  17. CustomManager.Instance.RotateModel(eventData.delta.x);
  18. }
  19. public void OnBeginDrag(PointerEventData eventData)
  20. {
  21. }
  22. public void OnEndDrag(PointerEventData eventData)
  23. {
  24. }
  25. // Update is called once per frame
  26. void Update()
  27. {
  28. }
  29. }
  30. }