tileSprite(x, y, width, height, key, frame) → {Phaser.TileSprite}
Creates a new TileSprite object.
Parameters
Name | Type | Description |
---|---|---|
x | number | The x coordinate (in world space) to position the TileSprite at. |
y | number | The y coordinate (in world space) to position the TileSprite at. |
width | number | The width of the TileSprite. |
height | number | The height of the TileSprite. |
key | string | Phaser.BitmapData | PIXI.Texture | This is the image or texture used by the TileSprite during rendering. It can be a string which is a reference to the Phaser Image Cache entry, or an instance of a PIXI.Texture or BitmapData. |
frame | string | number | If this TileSprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. |
Returns
The newly created tileSprite object.
- Source code: gameobjects/GameObjectCreator.js (Line 163)
Please login to continue.