Package com.mygdx.game.Components
Class TileMap
- java.lang.Object
-
- com.mygdx.game.Components.Component
-
- com.mygdx.game.Components.TileMap
-
public class TileMap extends Component
Component that allows the rendering of tile-maps (has its own sprite batch)
-
-
Field Summary
-
Fields inherited from class com.mygdx.game.Components.Component
parent, reqsMet, requirements, type
-
-
Constructor Summary
Constructors Constructor Description TileMap(int id, RenderLayer layer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanUp()
Calls the Clean-Up function of the Component classcom.badlogic.gdx.math.Vector2
getTileDim()
com.badlogic.gdx.maps.tiled.TiledMap
getTileMap()
void
render()
draws the first 2 layersvoid
update()
Updates the renderer's view with the rendering camera
-
-
-
Constructor Detail
-
TileMap
public TileMap(int id, RenderLayer layer)
- Parameters:
id
- resource id of the tilemaplayer
- rendering layer
-
-
Method Detail
-
getTileDim
public com.badlogic.gdx.math.Vector2 getTileDim()
- Returns:
- the dimensions of the tilemap
-
getTileMap
public com.badlogic.gdx.maps.tiled.TiledMap getTileMap()
- Returns:
- the map attached to this object
-
update
public void update()
Updates the renderer's view with the rendering camera
-
-