I want to have a background with a repeating x-axis, that can be moved horizontally. What I have so far:
local background = Texture.new("parallax01.png", true, {wrap = Texture.REPEAT})
local shape = Shape.new()
shape:setFillStyle(Shape.TEXTURE, background)
shape:beginPath(Shape.NON_ZERO)
shape:moveTo(0,100)
shape:lineTo(0,application:getDeviceWidth())
shape:lineTo(application:getDeviceHeight(),application:getDeviceWidth())
shape:lineTo(application:getDeviceHeight(),100)
Can I somehow move the background image without changing the shape position? I am a total Gideros noob and I could not find anything useful. Thanks.
Comments
To see it in a game, download:
https://play.google.com/store/apps/details?id=com.sinistersoft.martians
Then press 'Start', look at the sea in the map.
(it moves vert and horiz using a sin/cos wave)
https://deluxepixel.com