I am new to Corona, but am loving it and am close to finishing my first game.
I have the new image sheet working in my game using the simple technique outlined in the tutorial on this site. I am using
[code]local options =
{
– The params below are required
width = 52,
height = 52,
numFrames = 104,
– The params below are optional; used for dynamic resolution support
sheetContentWidth = 1024, – width of original 1x size of entire sheet
sheetContentHeight = 1024 – height of original 1x size of entire sheet
}[/code]
This works, but now I have some graphics in there that are different sizes and I would like to change it so it loads this info into options from the external lua file created by texture packer. I’m not sure how to load that data into the variable options.
Here is a look at a little section of the data from texture packer.
--
-- created with TexturePacker (http://www.texturepacker.com)
--
-- $TexturePacker:SmartUpdate:45d49ca85ba9dcb45b621027336e4bc0$
local sheet =
{
frames = {
{ x=2, y=2, width=50, height=50 }, -- a\_normal
{ x=54, y=2, width=50, height=50 }, -- a\_secondary
{ x=106, y=2, width=50, height=50 }, -- a\_selected
{ x=158, y=2, width=50, height=50 }, -- a\_stacked
Any help would be appreciated.
Thank you
[import]uid: 117787 topic_id: 24895 reply_id: 324895[/import]