This commit is contained in:
Pan 2019-05-26 08:37:17 +12:00
parent 1f13abcd6d
commit 0cdf560f09

View File

@ -227,6 +227,9 @@ public class mainThread extends JFrame implements KeyListener, ActionListener, M
currentMouseX = MouseInfo.getPointerInfo().getLocation().x; currentMouseX = MouseInfo.getPointerInfo().getLocation().x;
currentMouseY = MouseInfo.getPointerInfo().getLocation().y; currentMouseY = MouseInfo.getPointerInfo().getLocation().y;
centerScreenX = getLocationOnScreen().x + 384;
centerScreenY = getLocationOnScreen().y + 256;
int deltaX = currentMouseX - centerScreenX; int deltaX = currentMouseX - centerScreenX;
int deltaY = currentMouseY - centerScreenY; int deltaY = currentMouseY - centerScreenY;