Ajout des derniers développement #1
1 changed files with 1 additions and 4 deletions
|
@ -23,7 +23,6 @@ end
|
||||||
|
|
||||||
function Charset:addChar(ii, jj)
|
function Charset:addChar(ii, jj)
|
||||||
local charx, chary = (jj-1)*(24*3), (ii-1)*(32*4)
|
local charx, chary = (jj-1)*(24*3), (ii-1)*(32*4)
|
||||||
print(charx, chary)
|
|
||||||
local char = {}
|
local char = {}
|
||||||
for i=1, 4 do
|
for i=1, 4 do
|
||||||
animatedDirection = {}
|
animatedDirection = {}
|
||||||
|
@ -47,9 +46,7 @@ function Charset:getRunningFrame(charID, direction)
|
||||||
local char = self.char[charID]
|
local char = self.char[charID]
|
||||||
local animatedDirection = char[direction]
|
local animatedDirection = char[direction]
|
||||||
local fakeFrame = math.min(math.floor(self.currentFrame) + 1, 4)
|
local fakeFrame = math.min(math.floor(self.currentFrame) + 1, 4)
|
||||||
print(fakeFrame)
|
|
||||||
local trueFrame = animation[fakeFrame]
|
local trueFrame = animation[fakeFrame]
|
||||||
print(trueFrame)
|
|
||||||
return animatedDirection[trueFrame]
|
return animatedDirection[trueFrame]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -68,7 +65,7 @@ end
|
||||||
function Charset:drawStanding(charsetName, charID, direction, x, y)
|
function Charset:drawStanding(charsetName, charID, direction, x, y)
|
||||||
local drawable = self.list[charsetName]
|
local drawable = self.list[charsetName]
|
||||||
local quad = self:getStandingFrame(charID, direction)
|
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
|
end
|
||||||
|
|
||||||
return Charset
|
return Charset
|
||||||
|
|
Loading…
Reference in a new issue