BatsAndPray/lib/animx/Examples/Working with TileSource/main.lua

16 lines
400 B
Lua
Raw Permalink Normal View History

2020-09-18 23:10:01 -05:00
animx=require 'animx'
anim=animx.newAnimation{
img='glitch_asset.png',
spritesPerRow=7,
tileHeight=154, --I knew it'd be somewhere near 640/4!
numberOfQuads=20 --try removing this!
}:reverse() --reverse loop
--[[
Note that If we don't give the tileHeight then it'd be
defaulted to image-height which we of-course don't want!!
]]
function love.draw()
anim:draw(400,300,0,3,3,108/2,160/2)
end