improvement(animation): add new animations
This commit is contained in:
parent
f6c53fd1a3
commit
a69a23a177
3 changed files with 20 additions and 2 deletions
|
@ -11,7 +11,7 @@ return {
|
||||||
startAt = 1,
|
startAt = 1,
|
||||||
endAt = 6,
|
endAt = 6,
|
||||||
loop = 1,
|
loop = 1,
|
||||||
speed = 16,
|
speed = 12,
|
||||||
pauseAtEnd = false,
|
pauseAtEnd = false,
|
||||||
},
|
},
|
||||||
["walk"] = {
|
["walk"] = {
|
||||||
|
@ -21,5 +21,19 @@ return {
|
||||||
speed = -1,
|
speed = -1,
|
||||||
pauseAtEnd = false,
|
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 |
|
@ -53,7 +53,11 @@ function Player:setAnimation()
|
||||||
self:changeAnimation("idle", false)
|
self:changeAnimation("idle", false)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
self:changeAnimation("idle", true)
|
if (self.zsp) > 0 then
|
||||||
|
self:changeAnimation("jump", false)
|
||||||
|
else
|
||||||
|
self:changeAnimation("fall", false)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue