Hello,
I am one step away from finishing my game and the only thing holding me up are some sprite animations.
I have entered the width and height of each frame in the sprite sheet correctly and it seems to run perfectly in the Corona Simulator.
However, when running the build on my iPhone 6, I get an error regarding incorrect (w,h) on the second row of frames.
Would anyone be able to take a look at my code and help pinpoint the issue?
Thanks for your help. I’ve included the code below.
-Mark
[lua]
–This is outside of my scene:Create()
local sheetOptions =
{
width = 720,
height = 1280,
numFrames = 40
}
–This is inside my scene:Create()
local sheet_gameOver = graphics.newImageSheet(“gameOverAnimationSprite_1.png”, sheetOptions, display.contentWidth, display.contentHeight)
local sheet_gameOver2 = graphics.newImageSheet(“gameOverAnimationSprite_2.png”, sheetOptions, display.contentWidth, display.contentHeight)
local sequences_gameOver = {
{
name = “normalRun”,
start = 1,
count = 40,
time = 2000,
loopCount = 1,
loopDirection = “forward”
}
}
splashSprite = display.newSprite(sheet_gameOver, sequences_gameOver)
splashSprite.x = display.contentWidth/2
splashSprite.y = display.contentHeight/2
splashSprite:scale(0.5,.5)
splashSprite:play()
local function spriteListener(event)
if(event.phase == “ended”) then
display.remove(splashSprite)
splashSprite2 = display.newSprite(sheet_gameOver2, sequences_gameOver)
splashSprite2.x = display.contentWidth/2
splashSprite2.y = display.contentHeight/2
splashSprite2:scale(0.5,.5)
splashSprite2:play()
end
end
splashSprite:addEventListener(“sprite”, spriteListener)
[/lua]