Interface IMapObject
- All Superinterfaces:
java.lang.Comparable<Resource>
,ICustomPropertyProvider
,Resource
public interface IMapObject
extends ICustomPropertyProvider, Resource
This 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.Rectangle2D
getBoundingBox()
Gets the hit box.java.awt.geom.Ellipse2D
getEllipse()
int
getGridId()
Gets the grid id.float
getHeight()
int
getId()
Gets the id.IMapObjectLayer
getLayer()
java.awt.geom.Point2D
getLocation()
Gets the location.IPolyShape
getPolygon()
IPolyShape
getPolyline()
IMapObjectText
getText()
ITilesetEntry
getTile()
java.lang.String
getType()
float
getWidth()
float
getX()
float
getY()
boolean
isEllipse()
boolean
isPoint()
boolean
isPolygon()
boolean
isPolyline()
void
setGridId(int gid)
void
setHeight(float height)
void
setId(int id)
void
setLocation(float x, float y)
void
setLocation(java.awt.geom.Point2D location)
void
setPolygon(IPolyShape polygon)
void
setPolyline(IPolyShape polyline)
void
setType(java.lang.String type)
void
setWidth(float width)
void
setX(float x)
void
setY(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