Package com.badlogic.gdx.maps
Class MapObject
- java.lang.Object
-
- com.badlogic.gdx.maps.MapObject
-
- Direct Known Subclasses:
CircleMapObject,EllipseMapObject,PolygonMapObject,PolylineMapObject,RectangleMapObject,TextureMapObject
public class MapObject extends java.lang.ObjectGeneric Map entity with basic attributes like name, opacity, color
-
-
Constructor Summary
Constructors Constructor Description MapObject()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColorgetColor()java.lang.StringgetName()floatgetOpacity()MapPropertiesgetProperties()booleanisVisible()voidsetColor(Color color)voidsetName(java.lang.String name)voidsetOpacity(float opacity)voidsetVisible(boolean visible)
-
-
-
Method Detail
-
getName
public java.lang.String getName()
- Returns:
- object's name
-
setName
public void setName(java.lang.String name)
- Parameters:
name- new name for the object
-
getColor
public Color getColor()
- Returns:
- object's color
-
setColor
public void setColor(Color color)
- Parameters:
color- new color for the object
-
getOpacity
public float getOpacity()
- Returns:
- object's opacity
-
setOpacity
public void setOpacity(float opacity)
- Parameters:
opacity- new opacity value for the object
-
isVisible
public boolean isVisible()
- Returns:
- whether the object is visible or not
-
setVisible
public void setVisible(boolean visible)
- Parameters:
visible- toggles object's visibility
-
getProperties
public MapProperties getProperties()
- Returns:
- object's properties set
-
-