mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 13:13:43 +00:00
Add Phaser.GameObjects.TileSprite#setTilePosition
Both arguments are optional.
This commit is contained in:
parent
935a89342d
commit
aebce8a695
1 changed files with 26 additions and 0 deletions
|
@ -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]
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue