Hi,
I am looking to make my 16x16 tile (background) that is animated fill the entire screen.
I would like to have the 16x16 tile repeat on both the x and y axis nexto eachother, without creating a new object for each “block”.
Is there a way to make my object fill the entire screen and have the animated texture repeat within the object?
Here’s my code:
local options = { width = 16, height = 16, numFrames = 16, } local sheet = graphics.newImageSheet( "image/sky.png", options ) local sky = { { name = "sky", start = 1, count = 16, time = 3200, } } local background = display.newSprite( sheet, sky ) background.xScale = 8; background.yScale = 8; background.x = \_XC; background.y = \_YC; background:play()
(_XC is the center of the screen on the x axis, _YC is the center of the screen on the y axis)
Thanks