Phaser.Physics.PointProxy = function (destination){ this.destination = destination; } ; Phaser.Physics.PointProxy.prototype.constructor = Phaser.Physics.PointProxy; Object.defineProperty(Phaser.Physics.PointProxy.prototype, "x", { get: function (){ return this.destination[0]; } , set: function (value){ this.destination[0] = value; } } ); Object.defineProperty(Phaser.Physics.PointProxy.prototype, "y", { get: function (){ return this.destination[1]; } , set: function (value){ this.destination[1] = value; } } );