FlorianBT / love-animation

Love2D animation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

License:MIT License


Languages

Language:Lua 100.0%