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, Comparable<Resource>
The
Blueprint class extends the MapObject class. It represents a blueprint that can contain multiple map objects and provides
functionality to build these objects at specified locations.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionInitializes a new instance of theBlueprintmap object.Initializes a new instance of theBlueprintmap object.Initializes a new instance of theBlueprintmap object. -
Method Summary
Modifier and TypeMethodDescriptionbuild(float x, float y) Builds a list of map objects at the specified coordinates.Builds a list of map objects at the specified location.getItems()Gets the list of map objects contained in this blueprint.booleankeepIds()Gets a value that indicates whether the IDs if this blueprint's map-objects should be kept.Methods inherited from class 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, toStringMethods inherited from class CustomPropertyProvider
getBoolValue, getBoolValue, getByteValue, getByteValue, getCharValue, getCharValue, getColorValue, getColorValue, getCommaSeparatedStringValues, getDoubleValue, getDoubleValue, getEnumValue, getEnumValue, getFileValue, getFileValue, getFloatValue, getFloatValue, getIntValue, getIntValue, getLongValue, getLongValue, getMapObjectId, getProperties, getProperty, getShortValue, getShortValue, getStringValue, getStringValue, hasCustomProperty, removeProperty, setProperties, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ICustomPropertyProvider
getBoolValue, getBoolValue, getByteValue, getByteValue, getCharValue, getCharValue, getColorValue, getColorValue, getCommaSeparatedStringValues, getDoubleValue, getDoubleValue, getEnumValue, getEnumValue, getFileValue, getFileValue, getFloatValue, getFloatValue, getIntValue, getIntValue, getLongValue, getLongValue, getMapObjectId, getProperties, getProperty, getShortValue, getShortValue, getStringValue, getStringValue, hasCustomProperty, removeProperty, setProperties, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue
-
Field Details
-
TEMPLATE_FILE_EXTENSION
Templates in this format typically come from the Tiled editor and only support a single MapObject.- See Also:
-
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 theBlueprintmap object. -
Blueprint
-
Blueprint
Initializes a new instance of theBlueprintmap 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
IMapObjects of thisBlueprintshould be re-applied after building new instances.
-
build
Builds a list of map objects at the specified location.- Parameters:
location- The location where the map objects should be built.- Returns:
- A list of built map objects.
-
build
Builds a list of map objects at the specified coordinates.- Parameters:
x- The x-coordinate where the map objects should be built.y- The y-coordinate where the map objects should be built.- Returns:
- A list of built map objects.
-