I just downloaded löve the other day and boy do I love it! Lua seems a bit strange at first (when you come from C++, that is), but I think I got it now... well, almost: How do I distinguish between different userdata like Image or Animation?
Code: Select all
doStuff(myImage)
function doStuff(...)
if type(arg[1]) == "Image" then -- won't work, type returns userdata
-- do this
end
end
Hope you guys can help me out. Thanks in advance!
lbh