Package com.badlogic.gdx.maps.objects

Examples of com.badlogic.gdx.maps.objects.RectangleMapObject


        } else if ((child = element.getChildByName("ellipse")) != null) {
          object = new EllipseMapObject(x, y - height, width, height);
        }
      }
      if (object == null) {
        object = new RectangleMapObject(x, y - height, width, height);
      }
      object.setName(element.getAttribute("name", null));
      String rotation = element.getAttribute("rotation", null);
      if (rotation != null) {
        object.getProperties().put("rotation", Float.parseFloat(rotation));
View Full Code Here


   
    // Carga los objetos móviles del nivel actual
    for (MapObject object : map.getLayers().get("objects").getObjects()) {
     
      if (object instanceof RectangleMapObject) {
        RectangleMapObject rectangleObject = (RectangleMapObject) object;
        if (rectangleObject.getProperties().containsKey(TiledMapManager.ENEMY)) {
          Rectangle rect = rectangleObject.getRectangle();
         
          enemy = new Enemy();
          enemy.position.set(rect.x, rect.y);
          enemies.add(enemy);
        }
View Full Code Here

   
    // Carga los objetos móviles del nivel actual
    for (MapObject object : map.getLayers().get("objects").getObjects()) {
     
      if (object instanceof RectangleMapObject) {
        RectangleMapObject rectangleObject = (RectangleMapObject) object;
        if (rectangleObject.getProperties().containsKey(TiledMapManager.MOBILE)) {
          Rectangle rect = rectangleObject.getRectangle();
         
          Direction direction = null;
          if (Boolean.valueOf((String) rectangleObject.getProperties().get("right_direction")))
            direction = Direction.RIGHT;
          else
            direction = Direction.LEFT;
         
          platform = new Platform(rect.x, rect.y, TiledMapManager.PLATFORM_WIDTH, TiledMapManager.PLATFORM_HEIGHT,
                        Integer.valueOf((String) rectangleObject.getProperties().get("offset")), direction);
          platforms.add(platform);
        }
      }
    }
  }
View Full Code Here

        } else if ((child = element.getChildByName("ellipse")) != null) {
          object = new EllipseMapObject(x, y - height, width, height);
        }
      }
      if (object == null) {
        object = new RectangleMapObject(x, y - height, width, height);
      }
      object.setName(element.getAttribute("name", null));
      String type = element.getAttribute("type", null);
      if (type != null) {
        object.getProperties().put("type", type);
View Full Code Here

        } else if ((child = element.getChildByName("ellipse")) != null) {
          object = new EllipseMapObject(x, y - height, width, height);
        }
      }
      if (object == null) {
        object = new RectangleMapObject(x, y - height, width, height);
      }
      object.setName(element.getAttribute("name", null));
      String type = element.getAttribute("type", null);
      if (type != null) {
        object.getProperties().put("type", type);
View Full Code Here

        } else if ((child = element.getChildByName("ellipse")) != null) {
          object = new EllipseMapObject(x, yUp ? y - height : y, width, height);
        }
      }
      if (object == null) {
        object = new RectangleMapObject(x, yUp ? y - height : y, width, height);
      }
      object.setName(element.getAttribute("name", null));
      String type = element.getAttribute("type", null);
      if (type != null) {
        object.getProperties().put("type", type);
View Full Code Here

        } else if ((child = element.getChildByName("ellipse")) != null) {
          object = new EllipseMapObject(x, yUp ? y - height : y, width, height);
        }
      }
      if (object == null) {
        object = new RectangleMapObject(x, yUp ? y - height : y, width, height);
      }
      object.setName(element.getAttribute("name", null));
      String type = element.getAttribute("type", null);
      if (type != null) {
        object.getProperties().put("type", type);
View Full Code Here

        } else if ((child = element.getChildByName("ellipse")) != null) {
          object = new EllipseMapObject(x, yUp ? y - height : y, width, height);
        }
      }
      if (object == null) {
        object = new RectangleMapObject(x, yUp ? y - height : y, width, height);
      }
      object.setName(element.getAttribute("name", null));
      String type = element.getAttribute("type", null);
      if (type != null) {
        object.getProperties().put("type", type);
View Full Code Here

        } else if ((child = element.getChildByName("ellipse")) != null) {
          object = new EllipseMapObject(x, yUp ? y - height : y, width, height);
        }
      }
      if (object == null) {
        object = new RectangleMapObject(x, yUp ? y - height : y, width, height);
      }
      object.setName(element.getAttribute("name", null));
      String type = element.getAttribute("type", null);
      if (type != null) {
        object.getProperties().put("type", type);
View Full Code Here

        } else if ((child = element.getChildByName("ellipse")) != null) {
          object = new EllipseMapObject(x, y - height, width, height);
        }
      }
      if (object == null) {
        object = new RectangleMapObject(x, y - height, width, height);
      }
      object.setName(element.getAttribute("name", null));
      String rotation = element.getAttribute("rotation", null);
      if (rotation != null) {
        object.getProperties().put("rotation", Float.parseFloat(rotation));
View Full Code Here

TOP

Related Classes of com.badlogic.gdx.maps.objects.RectangleMapObject

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.