Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --
- -- created with TexturePacker (http://www.codeandweb.com/texturepacker)
- --
- -- $TexturePacker:SmartUpdate:29c7e614e690668f3aae3eb8eed23ab1:1/1$
- --
- -- local sheetInfo = require("mysheet")
- -- local myImageSheet = graphics.newImageSheet( "mysheet.png", sheetInfo:getSheet() )
- -- local sprite = display.newSprite( myImageSheet , {frames={sheetInfo:getFrameIndex("sprite")}} )
- --
- local SheetInfo = {}
- SheetInfo.sheet =
- {
- frames = {
- {
- -- img_Backdrop1
- x=2,
- y=2,
- width=80,
- height=160,
- },
- {
- -- img_Backdrop2
- x=2,
- y=164,
- width=80,
- height=88,
- sourceX = 0,
- sourceY = 72,
- sourceWidth = 80,
- sourceHeight = 160
- },
- {
- -- img_darkmog1
- x=84,
- y=146,
- width=80,
- height=70,
- sourceX = 0,
- sourceY = 7,
- sourceWidth = 80,
- sourceHeight = 160
- },
- {
- -- img_darkmog2
- x=166,
- y=74,
- width=80,
- height=70,
- sourceX = 0,
- sourceY = 7,
- sourceWidth = 80,
- sourceHeight = 160
- },
- {
- -- img_darkmog3
- x=84,
- y=74,
- width=80,
- height=70,
- sourceX = 0,
- sourceY = 7,
- sourceWidth = 80,
- sourceHeight = 160
- },
- {
- -- img_darkmog4
- x=166,
- y=2,
- width=80,
- height=70,
- sourceX = 0,
- sourceY = 7,
- sourceWidth = 80,
- sourceHeight = 160
- },
- {
- -- img_darkmog5
- x=84,
- y=2,
- width=80,
- height=70,
- sourceX = 0,
- sourceY = 7,
- sourceWidth = 80,
- sourceHeight = 160
- },
- },
- sheetContentWidth = 256,
- sheetContentHeight = 256
- }
- SheetInfo.frameIndex =
- {
- ["img_Backdrop1"] = 1,
- ["img_Backdrop2"] = 2,
- ["img_darkmog1"] = 3,
- ["img_darkmog2"] = 4,
- ["img_darkmog3"] = 5,
- ["img_darkmog4"] = 6,
- ["img_darkmog5"] = 7,
- }
- function SheetInfo:getSheet()
- return self.sheet;
- end
- function SheetInfo:getFrameIndex(name)
- return self.frameIndex[name];
- end
- return SheetInfo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement