Is there an example runner?

Hello . Please tell me how to make the background move endlessly. There is one background picture, I don’t understand how to make it move correctly. Can use groups? Is there an example runner?

Sorry for my English, it’s hard to understand the Faser.js documentation. because I don’t really understand English.

thanks!

Hi,
The trick seems to use:

var iter = 0;
function create () {
  // use tileSprite instead of image or sprite
  var background = this.add.tileSprite(400, 300, 800, 600, 'yourBackgroundimage');
}
function update() {
  background.tilePositionX += iter;
  iter += 0.01;
}

Not tested, based on this example:
http://labs.phaser.io/edit.html?src=src\game%20objects\tile%20sprite\Example.js

1 Like

Спасибо ! Thank you very much, I will do as in the example.