Phaser.GameObjectFactory = function (game){ this.game = game; this.world = this.game.world; } ; Phaser.GameObjectFactory.prototype = { game: null , world: null , sprite: function (x, y, key, frame){ return this.world.add(new Phaser.Sprite(this.game, x, y, key, frame)); } , tween: function (obj, localReference){ return this.game.tweens.create(obj, localReference); } , audio: function (key, volume, loop){ return this.game.sound.add(key, volume, loop); } , tileSprite: function (x, y, width, height, key, frame){ return this.world.add(new Phaser.TileSprite(this.game, x, y, width, height, key, frame)); } } ;