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

public Class Map

extends Object
implements Disposable
Class Inheritance
All Implemented Interfaces
com.badlogic.gdx.utils.Disposable
Known Direct Subclasses
com.badlogic.gdx.maps.tiled.TiledMap
Imports
com.badlogic.gdx.graphics.Texture, com.badlogic.gdx.maps.objects.CircleMapObject, .TextureMapObject, com.badlogic.gdx.maps.tiled.TiledMap, com.badlogic.gdx.utils.Disposable

A generic level map implementation.

A map has MapProperties which describe general attributes. Availability of properties depends on the type of map, e.g. what format is was loaded from etc.

A map has MapLayers. Map layers are ordered and indexed. A MapLayer contains MapObjects which represent things within the layer. Different types of MapObject are available, e.g. CircleMapObject, TextureMapObject, and so on.

A map can be rendered by a MapRenderer. A MapRenderer implementation may chose to only render specific MapObject or MapLayer types.

There are more specialized implementations of Map for specific use cases. e.g. the TiledMap class and its associated classes add functionality specifically for tile maps on top of the basic map functionality.

Maps must be disposed through a call to dispose() when no longer used.

Field Summary

Modifier and TypeField and Description
private MapLayers
private MapProperties

Constructor Summary

AccessConstructor and Description
public
Map()

Creates empty map

Method Summary

Modifier and TypeMethod and Description
public void
dispose()

Implements com.badlogic.gdx.utils.Disposable.dispose.

Disposes all resources like Texture instances that the map may own.

public MapLayers
getLayers()

Returns: the map's layers

public MapProperties
getProperties()

Returns: the map's properties

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

layersback to summary
private MapLayers layers
propertiesback to summary
private MapProperties properties

Constructor Detail

Mapback to summary
public Map()

Creates empty map

Method Detail

disposeback to summary
public void dispose()

Implements com.badlogic.gdx.utils.Disposable.dispose.

Disposes all resources like Texture instances that the map may own.

Annotations
@Override
getLayersback to summary
public MapLayers getLayers()
Returns:MapLayers

the map's layers

getPropertiesback to summary
public MapProperties getProperties()
Returns:MapProperties

the map's properties