hey, I have a sprite sheet called every time a collision happens,
and It’s in the function within the .createScene function, it’s like this:
[lua]rainbowEx =
{
– Required params
width = 320,
height = 320,
numFrames = 18,
– content scaling
sheetContentWidth =5760,
sheetContentHeight = 320,
}
function repRainbowExplosion()
rainbowExplosionSheet = graphics.newImageSheet( “Explosion_SpritesheetR22.png”, rainbowEx )
rainbow_exp = display.newSprite( rainbowExplosionSheet, { name=“rainbow_b_exp”, start=1, count=18, time=800, loopCount = 1 } )
rainbow_exp.anchorX = 0.5
rainbow_exp.anchorY = 0.5
rainbow_exp.x = display.contentCenterX
rainbow_exp.y = display.contentCenterY
–rainbow_exp:play()
rainbow_exp.isVisible = false
end[/lua]
I want explosion to be removed after it gets to the last frame, how is that possible ?