Specify type of ArcadeSprite.body

Do this by overwriting this.body in ArcadeSprite constructor.
This commit is contained in:
Thomas Tan 2018-05-22 10:16:21 +08:00
parent 8124ba9b86
commit ff38588285
No known key found for this signature in database
GPG key ID: A040BC34D269C351

View file

@ -83,6 +83,16 @@ var ArcadeSprite = new Class({
function ArcadeSprite (scene, x, y, texture, frame)
{
Sprite.call(this, scene, x, y, texture, frame);
/**
* If this Game Object is enabled for physics then this property will contain a reference to a Physics Body.
*
* @name Phaser.Physics.Arcade.Sprite#body
* @type {?Phaser.Physics.Arcade.Body}
* @default null
* @since 3.0.0
*/
this.body = null;
}
});