Phaser.Component.FixedToCamera = function (){ } ; Phaser.Component.FixedToCamera.postUpdate = function (){ if (this.fixedToCamera) { this.position.x = (this.game.camera.view.x + this.cameraOffset.x) / this.game.camera.scale.x; this.position.y = (this.game.camera.view.y + this.cameraOffset.y) / this.game.camera.scale.y; } } ; Phaser.Component.FixedToCamera.prototype = { fixedToCamera: false , cameraOffset: new Phaser.Point()} ;