GDX: fixed wrong shadow col, support for flipped Y coord

This commit is contained in:
minjaesong
2017-06-18 01:03:26 +09:00
parent 65108a0630
commit ab211d6433
2 changed files with 21 additions and 13 deletions

View File

@@ -16,6 +16,11 @@ class TextureRegionPack(
val vFrame: Int = 0
) {
companion object {
/** Intented for Y-down coord system, typically fon Non-GDX codebase */
var globalFlipY = false
}
val regions: Array<TextureRegion>
private val horizontalCount = (texture.width - 2 * hFrame + hGap) / (tileW + hGap)
@@ -32,6 +37,8 @@ class TextureRegionPack(
region.setRegion(texture)
region.setRegion(rx, ry, tileW, tileH)
region.flip(false, globalFlipY)
/*return*/region
})
}