public override void Invoke() { Vector2 originalPosition = getPosition(); if (isUi || DisplayPointTranslator.IsValidPoint(originalPosition)) { MouseOperations.SetCursorPosition(originalPosition); } else { var oldNext = next; next = new AutoActionBuilder() .Add(new SelfRepeatingAction(new AdjustCamera(getPosition))) .Add(new MoveMouse(getPosition)) .Add(oldNext) .Build(this); } }
private Vector2 GetCenterScreen() { return(DisplayPointTranslator.GetDisplayScreenResolution() / 2f); }