Features
- 2D Vector class with vector math built-in.
- Circle class with collision detection.
- Color class for easy re-use of colours.
- SoundEffect class with built-in source management.
- String library extensions.
- Wraps most LÖVE objects:
- Image
- ParticleSystem
- Framebuffer
- Font
- ImageFont
- Quad
- Music
Code: Select all
-- before:
myImage = love.graphics.newImage("image.png")
print(myImage:getWidth())
love.graphics.draw(myImage, 50, 10)
-- after:
myImage = Image("image.png") -- or just Image "image.png" - Lua is cool like that.
print(myImage:getWidth()) -- the object's functions still work without a hitch!
myImage:draw(50, 10) -- and you can pass all the other love.graphics.draw arguments to this function as well!
LÖVE-class requires MiddleClass and MiddleClass-Extras.
Including in your game
If your game folder is a Git repo, including the latest version of LÖVE-class is easy as cake.
Code: Select all
git submodule add git://github.com/TheLinx/loveclass.git lib/loveclass # or wherever else you want the LÖVE-class folder.
You can also download the latest sources from GitHub.
LÖVE-class uses the BSD license, which means you can use it freely in your game as long as you keep the license file in the loveclass folder.