我无法为我的应用程序的这个区域创建一个工作的动画精灵。
这是名字
mainCharacter.png
. 我有一个双倍大小的版本叫做
mainCharacter@2x.png
.
local playerSheetOptions =
{
width = 50,
height = 50,
numFrames = 17,
sheetContentWidth = 500,
sheetContentHeight = 100
}
local playerSequences = {
{
name = "idle",
start = 1,
count = 12,
time = 1200,
loopCount = 0,
loopDirection = "bounce"
},
{
name = "jump",
start = 13,
count = 5,
time = 600,
loopCount = 1
},
}
local playerSheet = graphics.newImageSheet( "resource/images/mainCharacter.png", playerSheetOptions )
local player = display.newSprite(gameSheet, playerSheet, playerSequences)
display.newSprite() requires argument #2 to a table containing sequence data
如果我
print
print(gameSheet)
print(playerSheet)
print(playerSequences)
我得到:
14:27:05.703 userdata: 12445228
14:27:05.703 userdata: 0CF42600
14:27:05.703 table: 0CF41FD0
我哪里做错了?我已经试着简化了很多序列,但仍然得到了同样的结果。