We are having a problem with the new bg repeat of G 2.0
Basically if we use spritesheets it works on simulator but not on the device.
Here the code example:
display.setDefault("
textureWrapX", “repeat”);
local groundSheetInfo = require(“classes.ground_sheet”)
local groundSheet = graphics.newImageSheet( “images/ground_sheet.png”, groundSheetInfo:getSheet() )
local groundSequenceData = {start=1, count=2}
local ground = display.newSprite( group, groundSheet , groundSequenceData )
groundLayer.x, groundLayer.y = display.contentCenterX, display.contentHeight-display.screenOriginY;
function groundLayer:enterFrame()
local gameSpeed = -(speed/512);
local fillX = self.fill.x;
fillX = fillX-gameSpeed;
if fillX > 1 then
fillX = fillX-1;
end
self.fill.x = fillX;
end
Runtime:addEventListener(“enterFrame”, ground);
display.setDefault(“textureWrapX”, “clampToEdge”);
If we use local ground = display.newImageRect(group, “images/ground.png”, _TW, 128); it will work on boths