You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/gameobjects/Sprite.js
+12-3Lines changed: 12 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -354,7 +354,7 @@ Phaser.Sprite = function (game, x, y, key, frame) {
354
354
/**
355
355
* @property {Phaser.Point} cameraOffset - If this Sprite is fixed to the camera then use this Point to specify how far away from the Camera x/y it's rendered.
356
356
*/
357
-
this.cameraOffset=newPhaser.Point();
357
+
this.cameraOffset=newPhaser.Point(x,y);
358
358
359
359
/**
360
360
* You can crop the Sprites texture by modifying the crop properties. For example crop.width = 50 would set the Sprite to only render 50px wide.
@@ -772,8 +772,17 @@ Phaser.Sprite.prototype.loadTexture = function (key, frame) {
0 commit comments