fix: some various fixes
This commit is contained in:
parent
3a9ac247fc
commit
df2716b3df
1 changed files with 1 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue