Phaser.TileSprite = function (game, x, y, width, height, key, frame){ x = x || 0; y = y || 0; width = width || 256; height = height || 256; key = key || null ; frame = frame || null ; Phaser.Sprite.call(this, game, x, y, key, frame); this.texture = PIXI.TextureCache[key]; PIXI.TilingSprite.call(this, this.texture, width, height); this.type = Phaser.TILESPRITE; this.tileScale = new Phaser.Point(1, 1); this.tilePosition = new Phaser.Point(0, 0); } ; Phaser.TileSprite.prototype = Phaser.Utils.extend(true , PIXI.TilingSprite.prototype, Phaser.Sprite.prototype); Phaser.TileSprite.prototype.constructor = Phaser.TileSprite;