Пример #1
0
 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());
   }
 }
Пример #2
0
 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());
     }
   }
 }