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){ if (typeof key === "undefined") { key = ''; } if (typeof frame === "undefined") { frame = null ; } return this.world.add(new Phaser.Sprite(this.game, x, y, key, frame)); } , tween: function (obj, localReference){ if (typeof localReference === "undefined") { localReference = false ; } return this.game.tweens.create(obj, localReference); } } ;