mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-13 23:26:07 +09:00
issue #16: walking fixed, jump not
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user