void OnGestureTap(float distance) { Vector2 start = Camera.main.WorldToScreenPoint(transform.position); Vector2 end = g.LastPoint; var angle = MathUtil.AngleOfLine(start, end); Attack(angle); }
public void HandleGestureSwipe(Vector2 point, float distance) { if (OnGestureSwipe == null) { return; } var angle = MathUtil.AngleOfLine(beginPoint, point); OnGestureSwipe.Invoke(angle, distance); }