Class TileLayerCollision
java.lang.Object
com.codename1.gaming.platformer.view.TileLayerCollision
Converts between a drawn com.codename1.gaming.level.TileLayer and the
collision TileGrid the simulation reads.
A game painting its levels with an atlas keeps one table, "frame N of the
sheet is solid, frame M is a one-way ledge", and derives the collision from
the art with #toGrid; a game that writes Tile characters derives the art
from the collision with #toLayer.
-
Method Summary
-
Method Details
-
toGrid
-
toLayer
Builds a tile layer that draws a collision grid.
Parameters
grid: the gridsheet: the tilesetkindFrames: the sheet frame for eachTilekind, indexed by kind; -1 or past the end draws nothing
Returns
the layer
-