我試着去得到一個精靈表通過4幅圖像,所以它起着一個動畫,雖然電暈SDK是給我一個錯誤說科羅娜SDK(LUA)精靈表動畫
「main.lua40運行:錯誤的參數#2(預期表(選項)) 'newImageSheet' 棧回溯:[C]:在函數 'newImageSheet' main.lua 40:主塊」
exclamationMarkAnimations = graphics.newImageSheet("exclamationMarkAnimated.png", sheetOptions)
exclamationMarkAnimated =
{
width = 12,
height = 12,
numFrames = 4
}
animation = {
{
name = "bobbing",
start = 1,
count = 4,
time = 800,
loopCount = 0, -- "0" means always
loopDirection = "forward"
}
}
exclamationMarkVars = display.newSprite(exclamationMarkAnimations, exclamationMarkAnimated)
exclamationMarkVars:addEventListener("sprite", spriteListener)
謝謝你的任何和所有幫助。
Whitch line ** line 40 **? – Albert
最上面一行是第40行,謝謝 – hayful59
「sheetOptions」的定義在哪裏? – hjpotter92