javascript - Changing position of Phaser.Text when fixedToCamera -
How would I go about changing a fisher's position? Element of the text when its feature is stable then the camera is set to true. The value of counterText.x is always reset to 45 in the code given below;
var game = new Phaser.Game (500, 500, 'phaser-example', {create: create, update: update}); Var counter = 0; Create a function () {counterText = game.add.text (45, 45, 'text', {font: "26px Verdana", fill: "#fff"}); CounterText.fixedToCamera = True; } Function updates () {counterText.x = counter ++; }
I assume the problem here that when the suretaker is true, there is no text Use 'position' now, but instead uses 'camera offset' so if you modify that you position as a condition, everything should work fine.
Comments
Post a Comment