Hi,
I have a simple scene with a newRect for the grass, and a spritesheet with 4 images, the animation lags a lot, I tried to change the simulator view (iphone, ipad) but it lags.
The image is 112 Ko and the size is 112 x 41 :
Could someone try or is there something I am missing? Is it because of the simulator?
function initSprite()
local options =
{
width = 28,
height = 41,
numFrames = 4,
sheetContentWidth = 112, -- width of original 1x size of entire sheet
sheetContentHeight = 41 -- height of original 1x size of entire sheet
}
local imageSheet = graphics.newImageSheet( "Assets/hero.png", options )
local sequenceData =
{
name="walking",
start=1,
count=4,
time=500,
loopCount = 0, -- Optional ; default is 0 (loop indefinitely)
loopDirection = "forward" -- Optional ; values include "forward" or "bounce"
}
hero = display.newSprite( imageSheet, sequenceData )
hero.x = display.contentCenterX
hero.y = display.contentCenterY
sceneGroup:insert(hero)
end