Animations And LÖVE (AnAL) - The animations replacement lib
Re: Animations And LÖVE (AnAL) - The animations replacement
So how do I make it work in my program? I downloaded AnAL, but Love wont use it.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Animations And LÖVE (AnAL) - The animations replacement
Did you require it in your main.lua?
Re: Animations And LÖVE (AnAL) - The animations replacement
First I'd like to thank you for the work on AnAL. I've been using it while trying to learn Löve and Lua. Today I stumbled upon a bug that has an easy fix.
At line 128-132
This doesn't work as you are using the value 0 when Lua starts with 1. Easy mistake when we're all used to start with 0.
At line 128-132
Code: Select all
--- Reset
-- Go back to the first frame.
function animation:reset()
self:seek(0)
end
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Animations And LÖVE (AnAL) - The animations replacement
I guess that's what you get for porting code..
Re: Animations And LÖVE (AnAL) - The animations replacement
Luckily it wasn't that bad. AnAL has helped me a lot so far so your work is really appreciated.
- TechnoCat
- Inner party member
- Posts: 1611
- Joined: Thu Jul 30, 2009 12:31 am
- Location: Milwaukee, WI
- Contact:
Re: Animations And LÖVE (AnAL) - The animations replacement
AnAL.lua:109
I think should be
Get those global a's out of here!
Code: Select all
function animation:addFrame(x, y, w, h, delay)
local frame = love.graphics.newQuad(x, y, w, h, a.img:getWidth(), a.img:getHeight())
table.insert(self.frames, frame)
table.insert(self.delays, delay)
end
Code: Select all
function animation:addFrame(x, y, w, h, delay)
local frame = love.graphics.newQuad(x, y, w, h, self.img:getWidth(), self.img:getHeight())
table.insert(self.frames, frame)
table.insert(self.delays, delay)
end
Re: Animations And LÖVE (AnAL) - The animations replacement
Or just change
to
I just fixed the same bug for myself
Code: Select all
--- Reset
-- Go back to the first frame.
function animation:reset()
self:seek(O)
end
Code: Select all
--- Reset
-- Go back to the first frame.
function animation:reset()
self:seek(1)
end
Re: Animations And LÖVE (AnAL) - The animations replacement
how many arguments the anim:draw take?
Re: Animations And LÖVE (AnAL) - The animations replacement
Code: Select all
animation:draw(x, y, angle, sx, sy, ox, oy)
"Docendo discimus" - Lucius Annaeus Seneca
Who is online
Users browsing this forum: No registered users and 8 guests