Package games.stendhal.client.gui.j2d.entity

Examples of games.stendhal.client.gui.j2d.entity.EntityView


       * Try the physical entity areas first
       */
      it = views.listIterator(views.size());

      while (it.hasPrevious()) {
        final EntityView view = it.previous();

        IEntity entity = view.getEntity();
        if (entity != null) {
          if (entity.getArea().contains(x, y)) {
            return view;
          }
        }
      }

      /*
       * Now the visual entity areas
       */
      final int sx = convertWorldToScreen(x);
      final int sy = convertWorldToScreen(y);

      it = views.listIterator(views.size());

      while (it.hasPrevious()) {
        final EntityView view = it.previous();

        if (view.getArea().contains(sx, sy)) {
          return view;
        }
      }
    }

View Full Code Here


       * Try the physical entity areas first
       */
      it = views.listIterator(views.size());

      while (it.hasPrevious()) {
        final EntityView view = it.previous();

        if (view.isMovable()) {
          if (view.getEntity().getArea().contains(x, y)) {
            return view;
          }
        }
      }

      /*
       * Now the visual entity areas
       */
      final int sx = convertWorldToScreen(x);
      final int sy = convertWorldToScreen(y);

      it = views.listIterator(views.size());

      while (it.hasPrevious()) {
        final EntityView view = it.previous();

        if (view.isMovable()) {
          if (view.getArea().contains(sx, sy)) {
            return view;
          }
        }
      }
    }
View Full Code Here

TOP

Related Classes of games.stendhal.client.gui.j2d.entity.EntityView

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.