Created
October 17, 2013 16:42
-
-
Save GloryFish/7028213 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module(...) | |
-- This file is for use with Love2d and was generated by Zwoptex (http://zwoptexapp.com/) | |
-- | |
-- The function getSpriteSheetData() returns a table suitable for importing using sprite.newSpriteSheetFromData() | |
-- | |
-- Usage example: | |
-- local zwoptexData = require "ThisFile.lua" | |
-- local data = zwoptexData.getSpriteSheetData() | |
-- local spriteSheet = sprite.newSpriteSheetFromData( "Untitled.png", data ) | |
-- | |
-- For more details, see http://developer.anscamobile.com/content/game-edition-sprite-sheets | |
function getFrames() | |
local frames = { | |
{% for sprite in spritesAndAliases %} | |
{ | |
name = "{{ sprite.name }}", | |
rect = { x = {{ sprite.textureRectX }}, y = {{ sprite.textureRectY }}, width = {{ sprite.textureRectWidth }}, height = {{ sprite.textureRectHeight }} }, | |
}, | |
{% /for %} | |
} | |
return frames | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment