Class Layer
java.lang.Object
de.gurkenlabs.litiengine.environment.tilemap.xml.CustomPropertyProvider
de.gurkenlabs.litiengine.environment.tilemap.xml.Layer
- All Implemented Interfaces:
ICustomPropertyProvider,ILayer
- Direct Known Subclasses:
GroupLayer,ImageLayer,MapObjectLayer,TileLayer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidafterUnmarshal(jakarta.xml.bind.Unmarshaller u, Object parent) intGets the height.doubleGets the horizontal parallax scrolling factor of the layer.intgetId()getMap()getName()Gets the name.Gets both the X and the Y offset of the layer.doubleGets the horizontal offset of the layer.doubleGets the vertical offset of the layer.floatGets the opacity.Gets the size in tiles.Gets a tint color that affects the way contents of this layer are rendered.doubleGets the vertical parallax scrolling factor of the layer.intgetWidth()Gets the width.booleanChecks if is visible.voidsetHeight(int height) protected voidvoidvoidsetOpacity(float opacity) voidsetRenderType(RenderType renderType) voidsetTintColor(Color tintColor) Sets the tint color of this layer.voidsetVisible(boolean visible) voidsetWidth(int width) Methods inherited from class de.gurkenlabs.litiengine.environment.tilemap.xml.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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.gurkenlabs.litiengine.environment.tilemap.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
-
Constructor Details
-
Layer
protected Layer() -
Layer
Copy Constructor for copying instances of Layers.- Parameters:
layerToBeCopied- the layer we want to copy
-
-
Method Details
-
getHeight
public int getHeight()Gets the height. -
getId
public int getId() -
getName
Description copied from interface:ILayerGets the name. -
getOpacity
public float getOpacity()Description copied from interface:ILayerGets the opacity.- Specified by:
getOpacityin interfaceILayer- Returns:
- the opacity
-
getOffset
Description copied from interface:ILayerGets both the X and the Y offset of the layer. -
getOffsetX
public double getOffsetX()Description copied from interface:ILayerGets the horizontal offset of the layer.- Specified by:
getOffsetXin interfaceILayer- Returns:
- the x offset
-
getOffsetY
public double getOffsetY()Description copied from interface:ILayerGets the vertical offset of the layer.- Specified by:
getOffsetYin interfaceILayer- Returns:
- the y offset
-
getHorizontalParallaxFactor
public double getHorizontalParallaxFactor()Description copied from interface:ILayerGets the horizontal parallax scrolling factor of the layer. Defaults to 1.0.- Specified by:
getHorizontalParallaxFactorin interfaceILayer- Returns:
- The horizontal parallax scrolling factor.
-
getVerticalParallaxFactor
public double getVerticalParallaxFactor()Description copied from interface:ILayerGets the vertical parallax scrolling factor of the layer. Defaults to 1.0.- Specified by:
getVerticalParallaxFactorin interfaceILayer- Returns:
- The vertical parallax scrolling factor.
-
getTintColor
Description copied from interface:ILayerGets a tint color that affects the way contents of this layer are rendered.- Specified by:
getTintColorin interfaceILayer- Returns:
- A color that is used to tint the visible contents of this layer.
-
setTintColor
Description copied from interface:ILayerSets the tint color of this layer.- Specified by:
setTintColorin interfaceILayer- Parameters:
tintColor- The tint color of this layer.
-
getRenderType
- Specified by:
getRenderTypein interfaceILayer
-
getSizeInTiles
Description copied from interface:ILayerGets the size in tiles.- Specified by:
getSizeInTilesin interfaceILayer- Returns:
- the size in tiles
-
getWidth
public int getWidth()Gets the width. -
getMap
-
isVisible
public boolean isVisible()Description copied from interface:ILayerChecks if is visible. -
setName
-
setWidth
public void setWidth(int width) -
setHeight
public void setHeight(int height) -
setOpacity
public void setOpacity(float opacity) - Specified by:
setOpacityin interfaceILayer
-
setRenderType
- Specified by:
setRenderTypein interfaceILayer
-
setVisible
public void setVisible(boolean visible) - Specified by:
setVisiblein interfaceILayer
-
setMap
-
afterUnmarshal
-