Skip to content

FlorianBT/love-animation

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

love-animation

Love2D Animation

A utility class to create animated sprites with Love2D.

Every animation is defined by an image file, and an animation file. The animation file describes the different frames and states of the animation, as well as the animation properties.

Take a look at animation.template.lua for an example.

Quick snippets to start using Love Animation :

Loading the animation

local anim = LoveAnimation.new('sprites/animation1.lua');

Updating the animation

function love.update(dt)

  -- update things ...
  
	anim:update(dt)

end

Drawing the animation

function love.draw()

  -- draw things ...

	anim:draw()

end

Changing the animation state

anim:setState("jump")

About

Love2D animation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 100.0%