public void doMapClick(int mx, int my) { // go to XY mx = mx - mapElement.getX(); my = my - mapElement.getY(); int mh = mapElement.getHeight(); int mw = mapElement.getWidth(); float sx = 1024 / mw; float sy = stageManager.getStartPos().y; float sz = 1024 / mh; float cx = 512; float cz = 512; Vector3f newMapPos = new Vector3f(mx * sx - cx, sy, my * sz - cz); System.out.println(" Mouse Map : " + mx + " " + my); stageManager.getRtsCam().setCenter(newMapPos); }
public void onActionClick(String buttonId, String actionName) { System.out.println(" Clicked " + buttonId); // gameGUIManager.goToScreen("EndGameScreen"); stageManager.doEntityAction(actionName); }