private void attackMoveSelected(int x, int y) { attackMoveClicked = false; GameSprite target = level.getSpriteAt(x, y); for (GameSprite sprite : selected) { if (target == null) sprite.goTo(x, y, true, shiftDown()); else sprite.goTo(target, true, shiftDown()); } }
private void rightMouseClick(int x, int y) { attackMoveClicked = false; GameSprite target = level.getSpriteAt(x, y); for (GameSprite sprite : selected) { if (sprite.onTeam(playerTeam)) { if (target == null) sprite.goTo(x, y, false, shiftDown()); else sprite.goTo(target, false, shiftDown()); } } }