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/BitmapText.js
+35-65Lines changed: 35 additions & 65 deletions
Original file line number
Diff line number
Diff line change
@@ -112,20 +112,36 @@ Phaser.BitmapText = function (game, x, y, font, text, size) {
112
112
this.position.set(x,y);
113
113
114
114
/**
115
-
* A small internal cache:
116
-
* 0 = previous position.x
117
-
* 1 = previous position.y
118
-
* 2 = previous rotation
119
-
* 3 = renderID
120
-
* 4 = fresh? (0 = no, 1 = yes)
121
-
* 5 = outOfBoundsFired (0 = no, 1 = yes)
122
-
* 6 = exists (0 = no, 1 = yes)
123
-
* 7 = fixed to camera (0 = no, 1 = yes)
124
-
* 8 = destroy phase? (0 = no, 1 = yes)
125
-
* @property {Array} _cache
126
-
* @private
115
+
* @property {Phaser.Point} previousPosition - The position the Sprite was in at the last update.
116
+
* @readOnly
117
+
*/
118
+
this.previousPosition=newPhaser.Point(x,y);
119
+
120
+
/**
121
+
* @property {number} previousRotation - The rotation angle the Sprite was in at the last update (in radians)
122
+
* @readOnly
123
+
*/
124
+
this.previousRotation=0;
125
+
126
+
/**
127
+
* @property {number} renderOrderID - The render order ID. This is used internally by the renderer and input manager and should not be modified.
128
+
* @readOnly
129
+
*/
130
+
this.renderOrderID=0;
131
+
132
+
/**
133
+
* A Sprite that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera. These are stored in Sprite.cameraOffset.
134
+
* Note that the cameraOffset values are in addition to any parent in the display list.
135
+
* So if this Sprite was in a Group that has x: 200, then this will be added to the cameraOffset.x
136
+
* @property {boolean} fixedToCamera
137
+
*/
138
+
this.fixedToCamera=false;
139
+
140
+
/**
141
+
* @property {boolean} destroyPhase - As a Sprite runs through its destroy method this flag is set to true, and can be checked in any sub-systems it is being destroyed from.
* An BitmapText that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera. These are stored in BitmapText.cameraOffset.
443
-
* Note that the cameraOffset values are in addition to any parent in the display list.
444
-
* So if this BitmapText was in a Group that has x: 200, then this will be added to the cameraOffset.x
445
-
*
446
-
* @name Phaser.BitmapText#fixedToCamera
447
-
* @property {boolean} fixedToCamera - Set to true to fix this BitmapText to the Camera at its current world coordinates.
* @property {Phaser.Point} previousPosition - The position the Sprite was in at the last update.
66
+
* @readOnly
77
67
*/
78
-
this._cache=[0,0,0,0,1,0,1,0,0];
68
+
this.previousPosition=newPhaser.Point(x,y);
69
+
70
+
/**
71
+
* @property {number} previousRotation - The rotation angle the Sprite was in at the last update (in radians)
72
+
* @readOnly
73
+
*/
74
+
this.previousRotation=0;
75
+
76
+
/**
77
+
* @property {number} renderOrderID - The render order ID. This is used internally by the renderer and input manager and should not be modified.
78
+
* @readOnly
79
+
*/
80
+
this.renderOrderID=0;
81
+
82
+
/**
83
+
* A Sprite that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera. These are stored in Sprite.cameraOffset.
84
+
* Note that the cameraOffset values are in addition to any parent in the display list.
85
+
* So if this Sprite was in a Group that has x: 200, then this will be added to the cameraOffset.x
86
+
* @property {boolean} fixedToCamera
87
+
*/
88
+
this.fixedToCamera=false;
89
+
90
+
/**
91
+
* @property {boolean} destroyPhase - As a Sprite runs through its destroy method this flag is set to true, and can be checked in any sub-systems it is being destroyed from.
* An Graphics that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera. These are stored in Graphics.cameraOffset.
343
-
* Note that the cameraOffset values are in addition to any parent in the display list.
344
-
* So if this Graphics was in a Group that has x: 200, then this will be added to the cameraOffset.x
345
-
*
346
-
* @name Phaser.Graphics#fixedToCamera
347
-
* @property {boolean} fixedToCamera - Set to true to fix this Graphics to the Camera at its current world coordinates.
0 commit comments