Package com.badlogic.gdx.maps

Examples of com.badlogic.gdx.maps.MapProperties


    int mapHeight = root.getIntAttribute("height", 0);
    int tileWidth = root.getIntAttribute("tilewidth", 0);
    int tileHeight = root.getIntAttribute("tileheight", 0);
    String mapBackgroundColor = root.getAttribute("backgroundcolor", null);

    MapProperties mapProperties = map.getProperties();
    if (mapOrientation != null) {
      mapProperties.put("orientation", mapOrientation);
    }
    mapProperties.put("width", mapWidth);
    mapProperties.put("height", mapHeight);
    mapProperties.put("tilewidth", tileWidth);
    mapProperties.put("tileheight", tileHeight);
    if (mapBackgroundColor != null) {
      mapProperties.put("backgroundcolor", mapBackgroundColor);
    }
    mapTileWidth = tileWidth;
    mapTileHeight = tileHeight;
    mapWidthInPixels = mapWidth * tileWidth;
    mapHeightInPixels = mapHeight * tileHeight;
 
View Full Code Here


      }

      TextureRegion texture = imageResolver.getImage(image.path());

      TiledMapTileSet tileset = new TiledMapTileSet();
      MapProperties props = tileset.getProperties();
      tileset.setName(name);
      props.put("firstgid", firstgid);
      props.put("imagesource", imageSource);
      props.put("imagewidth", imageWidth);
      props.put("imageheight", imageHeight);
      props.put("tilewidth", tilewidth);
      props.put("tileheight", tileheight);
      props.put("margin", margin);
      props.put("spacing", spacing);

      int stopWidth = texture.getRegionWidth() - tilewidth;
      int stopHeight = texture.getRegionHeight() - tileheight;

      int id = firstgid;
View Full Code Here

    int mapHeight = root.getIntAttribute("height", 0);
    int tileWidth = root.getIntAttribute("tilewidth", 0);
    int tileHeight = root.getIntAttribute("tileheight", 0);
    String mapBackgroundColor = root.getAttribute("backgroundcolor", null);

    MapProperties mapProperties = map.getProperties();
    if (mapOrientation != null) {
      mapProperties.put("orientation", mapOrientation);
    }
    mapProperties.put("width", mapWidth);
    mapProperties.put("height", mapHeight);
    mapProperties.put("tilewidth", tileWidth);
    mapProperties.put("tileheight", tileHeight);
    if (mapBackgroundColor != null) {
      mapProperties.put("backgroundcolor", mapBackgroundColor);
    }
    mapTileWidth = tileWidth;
    mapTileHeight = tileHeight;
    mapWidthInPixels = mapWidth * tileWidth;
    mapHeightInPixels = mapHeight * tileHeight;
 
View Full Code Here

  }

  @Override
  public MapProperties getProperties () {
    if (properties == null) {
      properties = new MapProperties();
    }
    return properties;
  }
View Full Code Here

      }

      TextureRegion texture = imageResolver.getImage(image.path());

      TiledMapTileSet tileset = new TiledMapTileSet();
      MapProperties props = tileset.getProperties();
      tileset.setName(name);
      props.put("firstgid", firstgid);
      props.put("imagesource", imageSource);
      props.put("imagewidth", imageWidth);
      props.put("imageheight", imageHeight);
      props.put("tilewidth", tilewidth);
      props.put("tileheight", tileheight);
      props.put("margin", margin);
      props.put("spacing", spacing);

      int stopWidth = texture.getRegionWidth() - tilewidth;
      int stopHeight = texture.getRegionHeight() - tileheight;

      int id = firstgid;
View Full Code Here

    int mapHeight = root.getIntAttribute("height", 0);
    int tileWidth = root.getIntAttribute("tilewidth", 0);
    int tileHeight = root.getIntAttribute("tileheight", 0);
    String mapBackgroundColor = root.getAttribute("backgroundcolor", null);

    MapProperties mapProperties = map.getProperties();
    if (mapOrientation != null) {
      mapProperties.put("orientation", mapOrientation);
    }
    mapProperties.put("width", mapWidth);
    mapProperties.put("height", mapHeight);
    mapProperties.put("tilewidth", tileWidth);
    mapProperties.put("tileheight", tileHeight);
    if (mapBackgroundColor != null) {
      mapProperties.put("backgroundcolor", mapBackgroundColor);
    }

    mapTileWidth = tileWidth;
    mapTileHeight = tileHeight;
    mapWidthInPixels = mapWidth * tileWidth;
 
View Full Code Here

          trackedTextures.add(texture);
        }
      }

      TiledMapTileSet tileset = new TiledMapTileSet();
      MapProperties props = tileset.getProperties();
      tileset.setName(name);
      props.put("firstgid", firstgid);
      props.put("imagesource", imageSource);
      props.put("imagewidth", imageWidth);
      props.put("imageheight", imageHeight);
      props.put("tilewidth", tilewidth);
      props.put("tileheight", tileheight);
      props.put("margin", margin);
      props.put("spacing", spacing);

      for (AtlasRegion region : atlas.findRegions(regionsName)) {
        // handle unused tile ids
        if (region != null) {
          StaticTiledMapTile tile = new StaticTiledMapTile(region);
View Full Code Here

    int mapHeight = root.getIntAttribute("height", 0);
    int tileWidth = root.getIntAttribute("tilewidth", 0);
    int tileHeight = root.getIntAttribute("tileheight", 0);
    String mapBackgroundColor = root.getAttribute("backgroundcolor", null);

    MapProperties mapProperties = map.getProperties();
    if (mapOrientation != null) {
      mapProperties.put("orientation", mapOrientation);
    }
    mapProperties.put("width", mapWidth);
    mapProperties.put("height", mapHeight);
    mapProperties.put("tilewidth", tileWidth);
    mapProperties.put("tileheight", tileHeight);
    if (mapBackgroundColor != null) {
      mapProperties.put("backgroundcolor", mapBackgroundColor);
    }
    mapWidthInPixels = mapWidth * tileWidth;
    mapHeightInPixels = mapHeight * tileHeight;

    Element properties = root.getChildByName("properties");
View Full Code Here

      }

      TextureRegion texture = imageResolver.getImage(image.path());

      TiledMapTileSet tileset = new TiledMapTileSet();
      MapProperties props = tileset.getProperties();
      tileset.setName(name);
      props.put("firstgid", firstgid);
      props.put("imagesource", imageSource);
      props.put("imagewidth", imageWidth);
      props.put("imageheight", imageHeight);
      props.put("tilewidth", tilewidth);
      props.put("tileheight", tileheight);
      props.put("margin", margin);
      props.put("spacing", spacing);

      int stopWidth = texture.getRegionWidth() - tilewidth;
      int stopHeight = texture.getRegionHeight() - tileheight;

      int id = firstgid;
View Full Code Here

    int mapHeight = root.getIntAttribute("height", 0);
    int tileWidth = root.getIntAttribute("tilewidth", 0);
    int tileHeight = root.getIntAttribute("tileheight", 0);
    String mapBackgroundColor = root.getAttribute("backgroundcolor", null);

    MapProperties mapProperties = map.getProperties();
    if (mapOrientation != null) {
      mapProperties.put("orientation", mapOrientation);
    }
    mapProperties.put("width", mapWidth);
    mapProperties.put("height", mapHeight);
    mapProperties.put("tilewidth", tileWidth);
    mapProperties.put("tileheight", tileHeight);
    if (mapBackgroundColor != null) {
      mapProperties.put("backgroundcolor", mapBackgroundColor);
    }
    mapWidthInPixels = mapWidth * tileWidth;
    mapHeightInPixels = mapHeight * tileHeight;

    for (int i = 0, j = root.getChildCount(); i < j; i++) {
View Full Code Here

TOP

Related Classes of com.badlogic.gdx.maps.MapProperties

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.