improvement(animation): add new animations

This commit is contained in:
Kazhnuz 2019-07-27 23:45:52 +02:00
parent f6c53fd1a3
commit a69a23a177
3 changed files with 20 additions and 2 deletions

View file

@ -11,7 +11,7 @@ return {
startAt = 1,
endAt = 6,
loop = 1,
speed = 16,
speed = 12,
pauseAtEnd = false,
},
["walk"] = {
@ -21,5 +21,19 @@ return {
speed = -1,
pauseAtEnd = false,
},
["jump"] = {
startAt = 15,
endAt = 18,
loop = 18,
speed = 10,
pauseAtEnd = true,
},
["fall"] = {
startAt = 19,
endAt = 21,
loop = 21,
speed = 10,
pauseAtEnd = true,
},
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View file

@ -53,7 +53,11 @@ function Player:setAnimation()
self:changeAnimation("idle", false)
end
else
self:changeAnimation("idle", true)
if (self.zsp) > 0 then
self:changeAnimation("jump", false)
else
self:changeAnimation("fall", false)
end
end
end
end