issue #16: walking fixed, jump not

This commit is contained in:
minjaesong
2019-01-19 16:44:59 +09:00
parent 971f7d4a40
commit 9ca078687f
6 changed files with 41 additions and 65 deletions

View File

@@ -163,11 +163,9 @@ class SpriteAnimation(val parentActor: ActorWBMovable) {
}
fun switchRow(newRow: Int) {
currentRow = newRow % nRows
//if beyond the frame index then reset
if (currentFrame > nFrames[currentRow]) {
reset()
if (newRow != currentRow) {
currentRow = newRow
currentFrame = 1
}
}