You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

39 lines
1.1 KiB

  1. using System;
  2. using System.Text;
  3. using UnityEngine;
  4. using UnityEngine.EventSystems;
  5. public class PinchEventData : BaseEventData
  6. {
  7. public PinchEventData(EventSystem eventSystem) : base(eventSystem)
  8. {
  9. }
  10. public GameObject Target { get; set; }
  11. public int Pointers { get; set; }
  12. public Vector2 Center { get; set; }
  13. public Vector2 Delta { get; set; }
  14. public Vector2 Velocity { get; set; }
  15. public float Distance { get; set; }
  16. public float ScaleDelta { get; set; }
  17. public override string ToString()
  18. {
  19. StringBuilder stringBuilder = new StringBuilder();
  20. stringBuilder.AppendLine("<b>target</b>: " + this.Target);
  21. stringBuilder.AppendLine("<b>pointers</b>: " + this.Pointers);
  22. stringBuilder.AppendLine("<b>center</b>: " + this.Center);
  23. stringBuilder.AppendLine("<b>delta</b>: " + this.Delta);
  24. stringBuilder.AppendLine("<b>velocity</b>: " + this.Velocity);
  25. stringBuilder.AppendLine("<b>distance</b>: " + this.Distance);
  26. stringBuilder.AppendLine("<b>scaleDelta</b>: " + this.ScaleDelta);
  27. return stringBuilder.ToString();
  28. }
  29. }