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/physics/arcade/StaticBody.js
+18-16Lines changed: 18 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ var Vector2 = require('../../math/Vector2');
15
15
* A Static Arcade Physics Body.
16
16
*
17
17
* A Static Body never moves, and isn't automatically synchronized with its parent Game Object.
18
-
* That means if you make any change to the parent's origin, position, or scale after creating or adding the body, you'll need to update the Body manually.
18
+
* That means if you make any change to the parent's origin, position, or scale after creating or adding the body, you'll need to update the Static Body manually.
19
19
*
20
20
* A Static Body can collide with other Bodies, but is never moved by collisions.
21
21
*
@@ -95,8 +95,8 @@ var StaticBody = new Class({
95
95
this.isCircle=false;
96
96
97
97
/**
98
-
* If this Static Body is circular, this is the unscaled radius of the Static Body's boundary, as set by {@link #setCircle}, in source pixels.
99
-
* The true radius is equal to `halfWidth`.
98
+
* If this Static Body is circular, this is the radius of the boundary, as set by {@linkPhaser.Physics.Arcade.StaticBody#setCircle}, in pixels.
99
+
* Equal to `halfWidth`.
100
100
*
101
101
* @name Phaser.Physics.Arcade.StaticBody#radius
102
102
* @type {number}
@@ -106,12 +106,13 @@ var StaticBody = new Class({
106
106
this.radius=0;
107
107
108
108
/**
109
-
* The offset of this Static Body's actual position from any updated position.
109
+
* The offset set by {@link Phaser.Physics.Arcade.StaticBody#setCircle} or {@link Phaser.Physics.Arcade.StaticBody#setSize}.
110
110
*
111
-
* Unlike a dynamic Body, a Static Body does not follow its Game Object. As such, this offset is only applied when resizing the Static Body.
111
+
* This doesn't affect the Static Body's position, because a Static Body does not follow its Game Object.
112
112
*
113
113
* @name Phaser.Physics.Arcade.StaticBody#offset
114
114
* @type {Phaser.Math.Vector2}
115
+
* @readonly
115
116
* @since 3.0.0
116
117
*/
117
118
this.offset=newVector2();
@@ -389,7 +390,7 @@ var StaticBody = new Class({
389
390
this.physicsType=CONST.STATIC_BODY;
390
391
391
392
/**
392
-
* The calculated change in the Body's horizontal position during the current step.
393
+
* The calculated change in the Static Body's horizontal position during the current step.
393
394
* For a static body this is always zero.
394
395
*
395
396
* @name Phaser.Physics.Arcade.StaticBody#_dx
@@ -401,7 +402,7 @@ var StaticBody = new Class({
401
402
this._dx=0;
402
403
403
404
/**
404
-
* The calculated change in the Body's vertical position during the current step.
405
+
* The calculated change in the Static Body's vertical position during the current step.
405
406
* For a static body this is always zero.
406
407
*
407
408
* @name Phaser.Physics.Arcade.StaticBody#_dy
@@ -450,7 +451,7 @@ var StaticBody = new Class({
450
451
},
451
452
452
453
/**
453
-
* Syncs the Body's position and size with its parent Game Object.
454
+
* Syncs the Static Body's position and size with its parent Game Object.
* @param {integer} [width] - The width of the Body in pixels. Cannot be zero. If not given, and the parent Game Object has a frame, it will use the frame width.
521
-
* @param {integer} [height] - The height of the Body in pixels. Cannot be zero. If not given, and the parent Game Object has a frame, it will use the frame height.
522
-
* @param {boolean} [center=true] - Modify the Body's `offset`, placing the Body's center on its Game Object's center. Only works if the Game Object has the `getCenter` method.
522
+
* @param {integer} [width] - The width of the Static Body in pixels. Cannot be zero. If not given, and the parent Game Object has a frame, it will use the frame width.
523
+
* @param {integer} [height] - The height of the Static Body in pixels. Cannot be zero. If not given, and the parent Game Object has a frame, it will use the frame height.
524
+
* @param {boolean} [center=true] - Place the Static Body's center on its Game Object's center. Only works if the Game Object has the `getCenter` method.
523
525
*
524
526
* @return {Phaser.Physics.Arcade.StaticBody} This Static Body object.
525
527
*/
@@ -572,7 +574,7 @@ var StaticBody = new Class({
572
574
},
573
575
574
576
/**
575
-
* Sets this Static Body to have a circular body and sets its sizes and position.
577
+
* Sets this Static Body to have a circular body and sets its size and position.
0 commit comments