LDtkLevel

class LDtkLevel(val uid: Int, val identifier: String, val iid: String, val pxWidth: Int, val pxHeight: Int, val worldX: Int, val worldY: Int, val neighbors: List<LDtkLevel.Neighbor>, val layers: List<LDtkLayer>, val entities: List<LDtkEntity>, val backgroundColor: String, levelBackgroundPos: LDtkLevelBackgroundPositionData? = null, bgImageTexture: TextureSlice? = null)

Author

Colton Daily

Constructors

Link copied to clipboard
fun LDtkLevel(uid: Int, identifier: String, iid: String, pxWidth: Int, pxHeight: Int, worldX: Int, worldY: Int, neighbors: List<LDtkLevel.Neighbor>, layers: List<LDtkLayer>, entities: List<LDtkEntity>, backgroundColor: String, levelBackgroundPos: LDtkLevelBackgroundPositionData? = null, bgImageTexture: TextureSlice? = null)

Types

Link copied to clipboard
data class CropRect(val x: Float, val y: Float, val w: Float, val h: Float)
Link copied to clipboard
data class LevelBgImage(val topLeftX: Int, val topLeftY: Int, val scaleX: Float, val scaleY: Float, val cropRect: LDtkLevel.CropRect, val slice: TextureSlice)
Link copied to clipboard
data class Neighbor(val levelUid: Int, val levelIid: String, val dir: LDtkLevel.NeighborDirection)

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
operator fun get(layer: String): LDtkLayer
Link copied to clipboard
fun layer(name: String): LDtkLayer
Link copied to clipboard
fun render(batch: Batch, camera: Camera, x: Float = worldX.toFloat(), y: Float = worldY.toFloat(), scale: Float = 1.0f)
fun render(batch: Batch, viewBounds: Rect, x: Float = worldX.toFloat(), y: Float = worldY.toFloat(), scale: Float = 1.0f)
Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val iid: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val uid: Int
Link copied to clipboard
val worldX: Int
Link copied to clipboard
val worldY: Int