fix wrong assert usage; addOneArgFun for Lua globals works

This commit is contained in:
minjaesong
2019-07-10 16:20:45 +09:00
parent 2c560a6f36
commit 514ea680aa
7 changed files with 252 additions and 26 deletions

View File

@@ -122,8 +122,8 @@ class SpriteAnimation(@Transient val parentActor: ActorWBMovable) {
* @param scale
*/
fun render(batch: SpriteBatch, posX: Float, posY: Float, scale: Float = 1f) {
assert(cellWidth == 0 || cellHeight == 0) {
throw Error("Sprite width or height is set to zero! ($cellWidth, $cellHeight); master: $parentActor")
assert(cellWidth > 0 || cellHeight > 0) {
"Sprite width or height is set to zero! ($cellWidth, $cellHeight); master: $parentActor"
}
if (visible) {