public static Point GetPointForDirection(Vector worldDirection)
        {
            if (worldDirection.Length == 0)
            {
                throw new InvalidOperationException("Invalid direction.");
            }
            else if (instance == null)
            {
                throw new InvalidOperationException("Instance is not initialized, cannot set click point.");
            }

            double angle = Maths.Angle(instance.upDirection, worldDirection);
            Vector rotatedScreenPoint = toRotate.Rotate(angle);
            Vector newScreenVect      = Center + rotatedScreenPoint;

            return(newScreenVect.ToPoint());
        }
Esempio n. 2
0
 protected void ClickAt(Vector point, Action callback, EClickType clickType)
 {
     MouseOperations.Click(point.ToPoint(), callback, clickType);
 }
Esempio n. 3
0
 protected void ClickAt(Vector point, Action callback)
 {
     MouseOperations.Click(point.ToPoint(), callback);
 }
 public static void Click(Vector position, EClickType clickType = EClickType.Left)
 {
     Click(position.ToPoint(), DEFAULT_CLICK_RELEASE_TIME, clickType);
 }
 public static void Click(Vector position, int duration, EClickType clickType)
 {
     Click(position.ToPoint(), duration, clickType);
 }