我正在使用以下代码播放爆炸动画,当它完成循环计数时,如何删除动画?
function showExplotion(event)
local sheetData = { width=32, height=32, numFrames=13, sheetContentWidth=128, sheetContentHeight=128 }
local mySheet = graphics.newImageSheet( "media/fire.png", sheetData )
local sequenceData = {
--{ name = "normalRun", start=1, count=13, loopCount = 1, time=800 }
{ name = "fastRun", frames={ 1,2,4,5,6,7,8,9,10,11,12,13 }, time=800, loopCount = 1 }
}
local animation = display.newSprite( mySheet, sequenceData )
animation.x = event.x
animation.y = event.y
animation:play()
end