public static bool CheckForPointerTarget(Collider checkCollider, PhysicsPointer pointer) { IPointerTarget target = null; if (checkCollider == null) { return(false); } if (checkCollider.attachedRigidbody != null) { target = checkCollider.attachedRigidbody.GetComponent(typeof(IPointerTarget)) as IPointerTarget; } else { target = checkCollider.GetComponent(typeof(IPointerTarget)) as IPointerTarget; } if (target != null) { target.OnPointerTarget(pointer); } return(target != null); }
public ControlPointerEventController(Control control, IPointerTarget target) : base(target) { _control = control; _control.MouseDown += TargetMouseDown; _control.MouseUp += TargetMouseUp; _control.MouseMove += TargetMouseMove; _control.MouseLeave += TargetMouseLeave; _control.MouseClick += TargetMouseClick; }
public PointerEventController(IPointerTarget target) { _target = target; }