Biggerplay Posted March 6, 2014 Share Posted March 6, 2014 Can you scale a tileSprite? I have this background which is 1024x600, which I wanted to be a tileSprite, obviously that's the wrong size so I thought I'd make it 1024x1024, and just set the scaleY to 0.5 (close enough to what I wanted) and it would work, but it doesn't seem too. Here's the code s = this.game.add.tileSprite(0, 0, 1024, 1024, 'background1'); s.scaleY = 0.5;What am I doing wrong? Link to comment Share on other sites More sharing options...
ctmartinez1992 Posted March 6, 2014 Share Posted March 6, 2014 http://docs.phaser.io/Phaser.TileSprite.html#toc42 If you check the documentation, there is no scaleY or scaleX, you have scale field which is a Point, here's how you do it:s = this.game.add.tileSprite(0, 0, 1024, 1024, 'background1');s.scale.y = 0.5; Biggerplay 1 Link to comment Share on other sites More sharing options...
cuchi12 Posted August 27, 2014 Share Posted August 27, 2014 There's no scale field in the TileSprite class, anyone has a way to scale them? Link to comment Share on other sites More sharing options...
lewster32 Posted August 27, 2014 Share Posted August 27, 2014 TileSprites have a tileScale property which is also a Point; and scales the repeating sprite inside it, which I guess is what you're after? s.tileScale.y = 0.5; Link to comment Share on other sites More sharing options...
Recommended Posts