How can I move a background image in 200px increments? My code isn't resetting the X position of the background image.
I am making a Dpad to slowly move a camera feed image. The arrow buttons are using states to show a hit state. I am using an animation with the the x position of camera feed image as a starting point and adding 200px.
The animation fires once and moves the image from 0 to -200.
The second time I click the arrow buttons the x position doesn't move to -400. It stays at -200.
rightAnim = new Animation
x: cameraFeed.x + 200
delay: Utils.randomNumber(0, 4)
rightBTN.on Events.Click, () ->
rightBTN.states.switch("inactive", time: .5)