Skip to content

Instantly share code, notes, and snippets.

@codepaladin
codepaladin / spritesheet1.lua
Last active March 28, 2019 04:14
SpriteSheet1
-- load in our spritesheet
local sheetInfo = require("spritesheet")
local sheetArray = sheetInfo:getSheet()
-- pick the sprite data we're going to use from the sheet
local options = sheetArray['frames'][sheetInfo:getFrameIndex("amg1")]
-- set the frame count, and the width of each individual frame
options.width = options.sourceWidth/8
options.numFrames = 8