Interface IMapObject
- All Superinterfaces:
java.lang.Comparable<Resource>,ICustomPropertyProvider,Resource
public interface IMapObject
extends ICustomPropertyProvider, ResourceThis interface represents an instance on a map that can define various things
for an engine. e.g. it can be used to define static collision boxes or other
special regions on the map.
Method Summary
Modifier and Type Method Description java.awt.geom.Rectangle2DgetBoundingBox()Gets the hit box.java.awt.geom.Ellipse2DgetEllipse()intgetGridId()Gets the grid id.floatgetHeight()intgetId()Gets the id.IMapObjectLayergetLayer()java.awt.geom.Point2DgetLocation()Gets the location.IPolyShapegetPolygon()IPolyShapegetPolyline()IMapObjectTextgetText()ITilesetEntrygetTile()java.lang.StringgetType()floatgetWidth()floatgetX()floatgetY()booleanisEllipse()booleanisPoint()booleanisPolygon()booleanisPolyline()voidsetGridId(int gid)voidsetHeight(float height)voidsetId(int id)voidsetLocation(float x, float y)voidsetLocation(java.awt.geom.Point2D location)voidsetPolygon(IPolyShape polygon)voidsetPolyline(IPolyShape polyline)voidsetType(java.lang.String type)voidsetWidth(float width)voidsetX(float x)voidsetY(float y)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
Method Details
getGridId
int getGridId()Gets the grid id.- Returns:
- the grid id
getTile
ITilesetEntry getTile()getBoundingBox
java.awt.geom.Rectangle2D getBoundingBox()Gets the hit box.- Returns:
- the hit box
getId
int getId()Gets the id.- Returns:
- the id
getLocation
java.awt.geom.Point2D getLocation()Gets the location.- Returns:
- the location
getType
java.lang.String getType()getPolyline
IPolyShape getPolyline()getPolygon
IPolyShape getPolygon()getEllipse
java.awt.geom.Ellipse2D getEllipse()getText
IMapObjectText getText()getLayer
IMapObjectLayer getLayer()setGridId
void setGridId(int gid)setId
void setId(int id)setType
void setType(java.lang.String type)setX
void setX(float x)setY
void setY(float y)setLocation
void setLocation(java.awt.geom.Point2D location)setLocation
void setLocation(float x, float y)setWidth
void setWidth(float width)setHeight
void setHeight(float height)getX
float getX()getY
float getY()getWidth
float getWidth()getHeight
float getHeight()isPolyline
boolean isPolyline()isPolygon
boolean isPolygon()isPoint
boolean isPoint()isEllipse
boolean isEllipse()setPolyline
setPolygon
