closing issue #34, it was just hitbox not properly being updated

This commit is contained in:
minjaesong
2020-03-10 23:34:36 +09:00
parent 7345a1015f
commit 5cafe16f20

View File

@@ -142,7 +142,7 @@ class SpriteAnimation(@Transient val parentActor: ActorWBMovable) {
} }
else if (flipHorizontal) { else if (flipHorizontal) {
batch.draw(region, batch.draw(region,
FastMath.floor(posX).toFloat() + (2f * parentActor.hitboxTranslateX * scale + scale * parentActor.hitbox.width.toFloat()), FastMath.floor(posX).toFloat() + (2f * parentActor.hitboxTranslateX * scale + parentActor.hitbox.width.toFloat()),
FastMath.floor(posY).toFloat(), FastMath.floor(posY).toFloat(),
-FastMath.floor(cellWidth * scale).toFloat(), -FastMath.floor(cellWidth * scale).toFloat(),
FastMath.floor(cellHeight * scale).toFloat() FastMath.floor(cellHeight * scale).toFloat()