mirror of
https://github.com/wassname/phaser.git
synced 2026-07-14 01:10:16 +08:00
Warning: This version has a new ArcadePhysics handler in it. Don't upgrade if you need this for live game code, wait until we go to master. Otherwise, this commit contains lots of new physics demos and a new updateMotion and Body class to try and fix, once and for all, the physics issues with applied forces.
This commit is contained in:
@@ -144,15 +144,14 @@ Phaser.GameObjectFactory.prototype = {
|
||||
* @param {number} width - the width of the tilesprite.
|
||||
* @param {number} height - the height of the tilesprite.
|
||||
* @param {string|Phaser.RenderTexture|PIXI.Texture} key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.
|
||||
* @param {string|number} frame - If this Sprite 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.
|
||||
* @param {Phaser.Group} [group] - Optional Group to add the object to. If not specified it will be added to the World group.
|
||||
* @return {Phaser.TileSprite} The newly created tileSprite object.
|
||||
*/
|
||||
tileSprite: function (x, y, width, height, key, frame, group) {
|
||||
tileSprite: function (x, y, width, height, key, group) {
|
||||
|
||||
if (typeof group === 'undefined') { group = this.world; }
|
||||
|
||||
return group.add(new Phaser.TileSprite(this.game, x, y, width, height, key, frame));
|
||||
return group.add(new Phaser.TileSprite(this.game, x, y, width, height, key));
|
||||
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user