Add Phaser.GameObjects.TileSprite#setTilePosition

Both arguments are optional.
This commit is contained in:
samme 2018-03-10 11:41:22 -08:00
parent 935a89342d
commit aebce8a695

View file

@ -188,6 +188,32 @@ var TileSprite = new Class({
}, this);
},
/**
* Sets {@link Phaser.GameObjects.TileSprite#tilePositionX} and {@link Phaser.GameObjects.TileSprite#tilePositionY}.
*
* @method Phaser.GameObjects.TileSprite#setTilePosition
* @since [version]
*
* @param {number} [x] - The x position of this sprite's tiling texture.
* @param {number} [y] - The y position of this sprite's tiling texture.
*
* @return {Phaser.GameObjects.TileSprite} This Tile Sprite instance.
*/
setTilePosition: function (x, y)
{
if (x !== undefined)
{
this.tilePositionX = x;
}
if (y !== undefined)
{
this.tilePositionY = y;
}
return this;
},
/**
* [description]
*