congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
IGraphicsGrid.getMapObjectsAt
Code IndexAdd Tabnine to your IDE (free)

How to use
getMapObjectsAt
method
in
jsettlers.common.map.IGraphicsGrid

Best Java code snippets using jsettlers.common.map.IGraphicsGrid.getMapObjectsAt (Showing top 4 results out of 315)

origin: jsettlers/settlers-remake

private boolean hasTreeObject(int x, int y) {
  IMapObject o = map.getMap().getMapObjectsAt(x, y);
  while (o != null) {
    EMapObjectType type = o.getObjectType();
    if (type == EMapObjectType.TREE_ADULT
        || type == EMapObjectType.TREE_DEAD) {
      return true;
    }
    o = o.getNextObject();
  }
  return false;
}
origin: jsettlers/settlers-remake

private void drawTile(int x, int y) {
  int tileIndex = x+y*width;
  IMapObject object = objectsGrid != null ? objectsGrid[tileIndex] : map.getMapObjectsAt(x, y);
  if (object != null) {
    this.objectDrawer.drawMapObject(x, y, object);
    object = objectsGrid != null ? objectsGrid[tileIndex-3*width] :map.getMapObjectsAt(x, y - 3);
    if (object != null && object.getObjectType() == EMapObjectType.BUILDING && ((IBuilding) object).getBuildingType() == EBuildingType.STOCK) {
      this.objectDrawer.drawStockFront(x, y - 3, (IBuilding) object);
    object = objectsGrid != null ? objectsGrid[tileIndex+3*width] : map.getMapObjectsAt(x, y + 3);
    if (object != null) {
      EMapObjectType type = object.getObjectType();
origin: jsettlers/settlers-remake

ShortPoint2D underMouse = this.context.getPositionOnScreen((float) mousePosition.getX(), (float) mousePosition.getY());
if (0 <= underMouse.x && underMouse.x < width && 0 <= underMouse.y && underMouse.y < height) {
  IMapObject mapObject = map.getMapObjectsAt(underMouse.x, underMouse.y);
origin: jsettlers/settlers-remake

IMapObject object = map.getMapObjectsAt(x, y);
IBuilding building = (object != null) ? (IBuilding) object.getMapObject(EMapObjectType.BUILDING) : null;
jsettlers.common.mapIGraphicsGridgetMapObjectsAt

Javadoc

Gets the first map object that is placed on the given position. There may be more map objects that can be retained by using the IMapObject#getNextObject() method.

Popular methods of IGraphicsGrid

  • getDebugColorAt
  • getHeight
  • getHeightAt
  • getLandscapeTypeAt
  • getMovableAt
  • getPartitionData
    Gets the current data and settings of the partition at the given position.
  • getPlayerIdAt
  • getVisibleStatus
  • getWidth
  • isBorder
  • isBuilding
    Returns true if the given position is covered by the blocked area of a building.
  • setBackgroundListener
    This method can be used to set a IGraphicsBackgroundListener to this IGraphicsGrid.
  • isBuilding,
  • setBackgroundListener

Popular in Java

  • Reading from database using SQL prepared statement
  • getApplicationContext (Context)
  • addToBackStack (FragmentTransaction)
  • notifyDataSetChanged (ArrayAdapter)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • JComboBox (javax.swing)
  • JTextField (javax.swing)
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now