All Implemented Interfaces:
ICustomPropertyProvider, IMapObject, Resource, Comparable<Resource>

public class Blueprint extends MapObject
  • Field Details

    • TEMPLATE_FILE_EXTENSION

      public static final String TEMPLATE_FILE_EXTENSION
      Templates in this format typically come from the Tiled editor and only support a single MapObject.
      See Also:
    • BLUEPRINT_FILE_EXTENSION

      public static final String BLUEPRINT_FILE_EXTENSION
      Blueprint in this format support multiple map objects as children (extended template XML).
      See Also:
  • Constructor Details

    • Blueprint

      public Blueprint()
      Initializes a new instance of the Blueprint map object.
    • Blueprint

      public Blueprint(String name, MapObject... mapObjects)
      Initializes a new instance of the Blueprint map object.
      Parameters:
      name - The name of the blueprint.
      mapObjects - The map objects to build the blueprint from.
    • Blueprint

      public Blueprint(String name, boolean keepIds, MapObject... mapObjects)
      Initializes a new instance of the Blueprint map object.
      Parameters:
      name - The name of the blueprint.
      keepIds - A flag indicating whether the IDs of the specified map objects should be kept.
      mapObjects - The map objects to build the blueprint from.
  • Method Details

    • getItems

      public Iterable<MapObject> getItems()
    • keepIds

      public boolean keepIds()
      Gets a value that indicates whether the IDs if this blueprint's map-objects should be kept. This is currently used when objects are cut and pasted afterwards.
      Returns:
      True if the ids for all IMapObjects of this Blueprint should be re-applied after building new instances.
    • build

      public List<IMapObject> build(Point2D location)
    • build

      public List<IMapObject> build(float x, float y)