fixed a bug where non-solid blocks would still placed indefinitely

This commit is contained in:
minjaesong
2022-07-22 17:19:43 +09:00
parent 6495e741e6
commit c903d48073
7 changed files with 135 additions and 31 deletions

View File

@@ -51,7 +51,7 @@ class SheetSpriteAnimation(parentActor: ActorWithBody) : SpriteAnimation(parentA
/**
* Sets delays for each rows. Array size must be the same as the rows of the sheet
*/
var delays: FloatArray = floatArrayOf(0.2f)
var delays: FloatArray = FloatArray(64) { 0.2f }
set(value) {
if (value.filter { it <= 0f }.isNotEmpty()) {
throw IllegalArgumentException("Delay array contains zero or negative value: $delays")