Skip to content

Commit e5f03f0

Browse files
committed
Added isBody boolean.
1 parent a67792a commit e5f03f0

1 file changed

Lines changed: 19 additions & 9 deletions

File tree

src/physics/arcade/BaseBody.js

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,16 @@ var BaseBody = new Class({
5858
*/
5959
this.world = world;
6060

61+
/**
62+
* Quick boolean body check.
63+
*
64+
* @name Phaser.Physics.Arcade.BaseBody#isBody
65+
* @type {boolean}
66+
* @readonly
67+
* @since 3.17.0
68+
*/
69+
this.isBody = true;
70+
6171
/**
6272
* The Game Object this Body belongs to.
6373
*
@@ -70,6 +80,15 @@ var BaseBody = new Class({
7080
*/
7181
this.gameObject = gameObject;
7282

83+
/**
84+
* The physics body type, either Dynamic or Static.
85+
*
86+
* @name Phaser.Physics.Arcade.BaseBody#physicsType
87+
* @type {integer}
88+
* @since 3.0.0
89+
*/
90+
this.physicsType = bodyType;
91+
7392
/**
7493
* Whether this Body is updated by the physics simulation.
7594
*
@@ -346,15 +365,6 @@ var BaseBody = new Class({
346365
*/
347366
this.hardBlocked = { none: true, up: false, down: false, left: false, right: false };
348367

349-
/**
350-
* The physics body type, either Dynamic or Static.
351-
*
352-
* @name Phaser.Physics.Arcade.BaseBody#physicsType
353-
* @type {integer}
354-
* @since 3.0.0
355-
*/
356-
this.physicsType = bodyType;
357-
358368
/**
359369
* Whether the simulation emits a `worldbounds` event when this Body collides with the world boundary (and `collideWorldBounds` is also true).
360370
*

0 commit comments

Comments
 (0)