Interface IMapObject
- All Superinterfaces:
Comparable<Resource>
,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 TypeMethodDescriptionGets the hit box.int
Gets the grid id.float
int
getId()
Gets the id.getLayer()
Gets the location.getText()
getTile()
getType()
float
getWidth()
float
getX()
float
getY()
boolean
boolean
isPoint()
boolean
boolean
void
setGridId
(int gid) void
setHeight
(float height) void
setId
(int id) void
setLocation
(float x, float y) void
setLocation
(Point2D location) void
setPolygon
(IPolyShape polygon) void
setPolyline
(IPolyShape polyline) void
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
Rectangle2D getBoundingBox()Gets the hit box.- Returns:
- the hit box
-
getId
int getId()Gets the id.- Returns:
- the id
-
getLocation
Point2D getLocation()Gets the location.- Returns:
- the location
-
getType
String getType() -
getPolyline
IPolyShape getPolyline() -
getPolygon
IPolyShape getPolygon() -
getEllipse
Ellipse2D getEllipse() -
getText
IMapObjectText getText() -
getLayer
IMapObjectLayer getLayer() -
setGridId
void setGridId(int gid) -
setId
void setId(int id) -
setType
-
setX
void setX(float x) -
setY
void setY(float y) -
setLocation
-
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
-