Jump to content

Looping background image


alliell
 Share

Recommended Posts

Hello, is there any way haw to loop background image in Phaser 3? 

I tried to something like this :

function preload() {

game.load.image("background", "background.png");

},

function create() {

var background = game.add.tileSprite(0, 0, 500, 500, "background");

},

function update() {

background.tilePosition.x += 0.5;

},

but this isn't working.

Thanks for any help

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...