//////////////////////////////////////////////////////////////////////////////// // // Copyright (C) 2007-2020 , Inc. All Rights Reserved. // //////////////////////////////////////////////////////////////////////////////// using UnityEngine; using UnityEngine.EventSystems; using GCSeries.Core.Input; namespace GCSeries.Core.EventSystems { public class ZPointerEventData : PointerEventData { public ZPointerEventData(EventSystem eventSystem) : base(eventSystem) { } /// /// A reference to the pointer responsible for dispatching /// the pointer event. /// public ZPointer Pointer { get; set; } = null; /// /// The event's associated pointer button id. /// public int ButtonId { get; set; } = -1; /// /// The pointer's 3D position delta since the last update. /// public Vector3 Delta3D { get; set; } = Vector3.zero; /// /// Is the pointer event in regards to a UI Object /// public bool IsUIObject { get; set; } = false; /// /// Checks whether the pointer is moving based on its 3D position delta. /// /// /// /// True if the pointer is moving. False otherwise. /// public bool IsPointerMoving3D() { return (this.Delta3D.sqrMagnitude > 0); } } }