APIdia Launch Partner
Top Description Fields Constructors Methods
com.badlogic.gdx.maps

public Class MapObject

extends Object
Class Inheritance
Known Direct Subclasses
com.badlogic.gdx.maps.objects.CircleMapObject, com.badlogic.gdx.maps.objects.EllipseMapObject, com.badlogic.gdx.maps.objects.PointMapObject, com.badlogic.gdx.maps.objects.PolygonMapObject, com.badlogic.gdx.maps.objects.PolylineMapObject, com.badlogic.gdx.maps.objects.RectangleMapObject, com.badlogic.gdx.maps.objects.TextMapObject, com.badlogic.gdx.maps.objects.TextureMapObject
Imports
com.badlogic.gdx.graphics.Color

Generic Map entity with basic attributes like name, opacity, color

Field Summary

Modifier and TypeField and Description
private Color
private String
private float
private MapProperties
private boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Color
getColor()

Returns: object's color

public String
getName()

Returns: object's name

public float
getOpacity()

Returns: object's opacity

public MapProperties
getProperties()

Returns: object's properties set

public boolean
isVisible()

Returns: whether the object is visible or not

public void
setColor(Color
new color for the object
color
)

public void
setName(String
new name for the object
name
)

public void
setOpacity(float
new opacity value for the object
opacity
)

public void
setVisible(boolean
toggles object's visibility
visible
)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

colorback to summary
private Color color
nameback to summary
private String name
opacityback to summary
private float opacity
propertiesback to summary
private MapProperties properties
visibleback to summary
private boolean visible

Constructor Detail

MapObjectback to summary
public MapObject()

Method Detail

getColorback to summary
public Color getColor()
Returns:Color

object's color

getNameback to summary
public String getName()
Returns:String

object's name

getOpacityback to summary
public float getOpacity()
Returns:float

object's opacity

getPropertiesback to summary
public MapProperties getProperties()
Returns:MapProperties

object's properties set

isVisibleback to summary
public boolean isVisible()
Returns:boolean

whether the object is visible or not

setColorback to summary
public void setColor(Color color)
Parameters
color:Color

new color for the object

setNameback to summary
public void setName(String name)
Parameters
name:String

new name for the object

setOpacityback to summary
public void setOpacity(float opacity)
Parameters
opacity:float

new opacity value for the object

setVisibleback to summary
public void setVisible(boolean visible)
Parameters
visible:boolean

toggles object's visibility