setOrigin needs to be called after setSize

This commit is contained in:
Richard Davey 2017-08-17 02:01:24 +01:00
parent ca4536a7ca
commit b0a1b54407

View file

@ -41,9 +41,8 @@ var TileSprite = new Class({
this.setTexture(texture, frame);
this.setPosition(x, y);
this.setSizeToFrame();
this.setOrigin();
this.setSize(width, height);
this.setOrigin();
this.potWidth = this.frame.width;
this.potHeight = this.frame.height;