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
+11-10Lines changed: 11 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -45,9 +45,9 @@ Phaser.Sprite = function (game, x, y, key, frame) {
45
45
this.alive=true;
46
46
47
47
/**
48
-
* @property {Phaser.Group} group - The parent Group of this Sprite. This is usually set after Sprite instantiation by the parent.
48
+
* @property {Phaser.Group|Phaser.Sprite} parent - The parent of this Sprite.
49
49
*/
50
-
this.group=null;
50
+
// this.group = null;
51
51
52
52
/**
53
53
* @property {string} name - The user defined name given to this Sprite.
@@ -169,7 +169,10 @@ Phaser.Sprite = function (game, x, y, key, frame) {
169
169
*
170
170
* @property {Phaser.Point} anchor - The anchor around which rotation and scaling takes place.
171
171
*/
172
-
this.anchor=newPhaser.Point();
172
+
// this.anchor = new Phaser.Point();
173
+
174
+
// this.position.x = x;
175
+
// this.position.y = y;
173
176
174
177
/**
175
178
* @property {number} x - The x coordinate in world space of this Sprite.
@@ -181,8 +184,6 @@ Phaser.Sprite = function (game, x, y, key, frame) {
181
184
*/
182
185
this.y=y;
183
186
184
-
this.position.x=x;
185
-
this.position.y=y;
186
187
187
188
/**
188
189
* @property {Phaser.Point} world - The world coordinates of this Sprite. This differs from the x/y coordinates which are relative to the Sprites container.
@@ -201,7 +202,7 @@ Phaser.Sprite = function (game, x, y, key, frame) {
201
202
/**
202
203
* @property {Phaser.Point} scale - The scale of the Sprite when rendered. By default it's set to 1 (no scale). You can modify it via scale.x or scale.y or scale.setTo(x, y). A value of 1 means no change to the scale, 0.5 means "half the size", 2 means "twice the size", etc.
203
204
*/
204
-
this.scale=newPhaser.Point(1,1);
205
+
// this.scale = new Phaser.Point(1, 1);
205
206
206
207
/**
207
208
* @property {object} _cache - A mini cache for storing all of the calculated values.
@@ -381,7 +382,7 @@ Phaser.Sprite = function (game, x, y, key, frame) {
381
382
this.updateBounds();
382
383
383
384
/**
384
-
* @property {PIXI.Point} pivot - The pivot point of the displayObject that it rotates around.
385
+
* @property {Phaser.Point} pivot - The pivot point of the displayObject that it rotates around.
0 commit comments