Skip to content

Commit ff38588

Browse files
committed
Specify type of ArcadeSprite.body
Do this by overwriting this.body in ArcadeSprite constructor.
1 parent 8124ba9 commit ff38588

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/physics/arcade/ArcadeSprite.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,16 @@ var ArcadeSprite = new Class({
8383
function ArcadeSprite (scene, x, y, texture, frame)
8484
{
8585
Sprite.call(this, scene, x, y, texture, frame);
86+
87+
/**
88+
* If this Game Object is enabled for physics then this property will contain a reference to a Physics Body.
89+
*
90+
* @name Phaser.Physics.Arcade.Sprite#body
91+
* @type {?Phaser.Physics.Arcade.Body}
92+
* @default null
93+
* @since 3.0.0
94+
*/
95+
this.body = null;
8696
}
8797

8898
});

0 commit comments

Comments
 (0)