Ajout des derniers développement #1

Merged
kazhnuz merged 68 commits from chronicles-cbs into master 2020-08-02 11:14:18 +02:00
Showing only changes of commit df2716b3df - Show all commits

View file

@ -23,7 +23,6 @@ end
function Charset:addChar(ii, jj)
local charx, chary = (jj-1)*(24*3), (ii-1)*(32*4)
print(charx, chary)
local char = {}
for i=1, 4 do
animatedDirection = {}
@ -47,9 +46,7 @@ function Charset:getRunningFrame(charID, direction)
local char = self.char[charID]
local animatedDirection = char[direction]
local fakeFrame = math.min(math.floor(self.currentFrame) + 1, 4)
print(fakeFrame)
local trueFrame = animation[fakeFrame]
print(trueFrame)
return animatedDirection[trueFrame]
end
@ -68,7 +65,7 @@ end
function Charset:drawStanding(charsetName, charID, direction, x, y)
local drawable = self.list[charsetName]
local quad = self:getStandingFrame(charID, direction)
love.graphics.draw(drawable, quad, x, y, 0, 1, 1, 4, 16)
love.graphics.draw(drawable, quad, math.floor(x), math.floor(y), 0, 1, 1, 4, 16)
end
return Charset