fix: add large anim support to actors

This commit is contained in:
Kazhnuz 2021-04-10 14:26:38 +02:00
parent cb50b7f256
commit 09e14eae86

View file

@ -29,6 +29,7 @@ function Parent:initCharset()
self.cantTurn = false self.cantTurn = false
self.isTurning = false self.isTurning = false
self.isFast = false self.isFast = false
self.largeAnim = false
end end
function Parent:setCharset(charset, charId, cantWalk) function Parent:setCharset(charset, charId, cantWalk)
@ -45,7 +46,9 @@ function Parent:drawCharset(charset, charId)
love.graphics.setColor(1,1,1,0.5) love.graphics.setColor(1,1,1,0.5)
self.assets.images["shadow"]:draw(x + 1, y + 11) self.assets.images["shadow"]:draw(x + 1, y + 11)
utils.graphics.resetColor() utils.graphics.resetColor()
if (self.largeAnim) then
self.charsetManager:drawLargeAnim(self.charset, self.charId, self.charDir, x, y - z, self.isFast)
else
if (not self.isTurning) then if (not self.isTurning) then
if (self:isMoving() and (not self.cantWalk)) then if (self:isMoving() and (not self.cantWalk)) then
self.charsetManager:drawMoving(self.charset, self.charId, self.charDir, x, y - z, self.isFast) self.charsetManager:drawMoving(self.charset, self.charId, self.charDir, x, y - z, self.isFast)
@ -56,6 +59,7 @@ function Parent:drawCharset(charset, charId)
self.charsetManager:drawTurning(self.charset, self.charId, x, y - z, self.isFast) self.charsetManager:drawTurning(self.charset, self.charId, x, y - z, self.isFast)
end end
end end
end
function Parent:draw() function Parent:draw()
if (self.charset ~= nil) then if (self.charset ~= nil) then