joshcawthorne Posted April 5, 2019 Share Posted April 5, 2019 Hi all, I'm using Phaser CE (latest edition), and looking to create a responsive game. At the moment, my canvas and sprites respond well to the window being resized whilst I use: game.scale.scaleMode = Phaser.ScaleManager.RESIZE; However, my scrolling tileSprite repeats itself on a big enough screen (see here: https://imgur.com/cuX4yir). Is it possible to have the tileSprite's height fill the screen, and the width automatically resize accordingly? Thanks! Link to comment Share on other sites More sharing options...
tianyagulvke Posted May 14, 2019 Share Posted May 14, 2019 yourtileSprite.scale(yourwidth/ yourtilesprite.texture.width,yourheight/ yourtilesprite.texture.height) Link to comment Share on other sites More sharing options...
tianyagulvke Posted May 20, 2019 Share Posted May 20, 2019 tilesprite = game.add.tileSprite(0, 0, the real width of img, the real height of img); tileSprite.scale(yourwidth/ yourtilesprite.texture.width,yourheight/ yourtilesprite.texture.height) Link to comment Share on other sites More sharing options...
Recommended Posts