Class Blueprint
java.lang.Object
de.gurkenlabs.litiengine.environment.tilemap.xml.CustomPropertyProvider
de.gurkenlabs.litiengine.environment.tilemap.xml.MapObject
de.gurkenlabs.litiengine.environment.tilemap.xml.Blueprint
- All Implemented Interfaces:
ICustomPropertyProvider
,IMapObject
,Resource
,java.lang.Comparable<Resource>
public class Blueprint
extends MapObject
Field Summary
Fields Modifier and Type Field Description static java.lang.String
BLUEPRINT_FILE_EXTENSION
Blueprint in this format support multiple map objects as children (extended template XML).static java.lang.String
TEMPLATE_FILE_EXTENSION
Templates in this format typically come from the Tiled editor and only support a single MapObject.Constructor Summary
Constructors Constructor Description Blueprint()
Initializes a new instance of theBlueprint
map object.Blueprint(java.lang.String name, boolean keepIds, MapObject... mapObjects)
Initializes a new instance of theBlueprint
map object.Blueprint(java.lang.String name, MapObject... mapObjects)
Initializes a new instance of theBlueprint
map object.Method Summary
Modifier and Type Method Description java.util.List<IMapObject>
build(float x, float y)
java.util.List<IMapObject>
build(java.awt.geom.Point2D location)
java.lang.Iterable<MapObject>
getItems()
boolean
keepIds()
Gets a value that indicates whether the IDs if this blueprint's map-objects should be kept.Methods inherited from class de.gurkenlabs.litiengine.environment.tilemap.xml.MapObject
getBoundingBox, getBounds, getBounds, getEllipse, getGridId, getHeight, getId, getLayer, getLocation, getName, getPolygon, getPolyline, getText, getTile, getType, getWidth, getX, getY, isEllipse, isPoint, isPolygon, isPolyline, setGridId, setHeight, setId, setLayer, setLocation, setLocation, setName, setPolygon, setPolyline, setType, setWidth, setX, setY, toString
Methods inherited from class de.gurkenlabs.litiengine.environment.tilemap.xml.CustomPropertyProvider
getBoolValue, getBoolValue, getByteValue, getByteValue, getColorValue, getColorValue, getCommaSeparatedStringValues, getDoubleValue, getDoubleValue, getEnumValue, getEnumValue, getFileValue, getFileValue, getFloatValue, getFloatValue, getIntValue, getIntValue, getLongValue, getProperties, getProperty, getShortValue, getShortValue, getStringValue, getStringValue, getTypeOfProperty, hasCustomProperty, removeProperty, setProperties, setTypeOfProperty, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface de.gurkenlabs.litiengine.environment.tilemap.ICustomPropertyProvider
getBoolValue, getBoolValue, getByteValue, getByteValue, getColorValue, getColorValue, getCommaSeparatedStringValues, getDoubleValue, getDoubleValue, getEnumValue, getEnumValue, getFileValue, getFileValue, getFloatValue, getFloatValue, getIntValue, getIntValue, getLongValue, getLongValue, getProperties, getProperty, getShortValue, getShortValue, getStringValue, getStringValue, getTypeOfProperty, hasCustomProperty, removeProperty, setProperties, setTypeOfProperty, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue
Field Details
TEMPLATE_FILE_EXTENSION
public static final java.lang.String TEMPLATE_FILE_EXTENSIONTemplates in this format typically come from the Tiled editor and only support a single MapObject.- See Also:
- Constant Field Values
BLUEPRINT_FILE_EXTENSION
public static final java.lang.String BLUEPRINT_FILE_EXTENSIONBlueprint in this format support multiple map objects as children (extended template XML).- See Also:
- Constant Field Values
Constructor Details
Blueprint
public Blueprint()Initializes a new instance of theBlueprint
map object.Blueprint
Initializes a new instance of theBlueprint
map object.- Parameters:
name
- The name of the blueprint.mapObjects
- The map objects to build the blueprint from.
Blueprint
Initializes a new instance of theBlueprint
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
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
IMapObject
s of thisBlueprint
should be re-applied after building new instances.
build
build