Skip to content

Commit 0b696eb

Browse files
committed
Added MatterJS.BodyType to GameObject.body type. Fix phaserjs#4962
1 parent 1411d55 commit 0b696eb

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ The following features are now deprecated and will be removed in a future versio
3939
* `XHRLoader` will now use the `XHRSettings.withCredentials` as set in the file or global loader config.
4040
* `Animation.setCurrentFrame` will no longer try to call `setOrigin` or `updateDisplayOrigin` if the Game Object doesn't have the Origin component, preventing unknown function errors.
4141
* `MatterTileBody` now extends `EventEmitter`, meaning you can listen to collision events from Tiles directly and it will no longer throw errors about `gameObject.emit` not working. Fix #4967 (thanks @reinildo)
42+
* Added `MatterJS.BodyType` to `GameObject.body` type. Fix #4962 (thanks @meisterpeeps)
4243

4344
### Bug Fixes
4445

src/gameobjects/GameObject.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,10 @@ var GameObject = new Class({
166166
this.input = null;
167167

168168
/**
169-
* If this Game Object is enabled for Arcade Physics then this property will contain a reference to a Physics Body.
169+
* If this Game Object is enabled for Arcade or Matter Physics then this property will contain a reference to a Physics Body.
170170
*
171171
* @name Phaser.GameObjects.GameObject#body
172-
* @type {?(object|Phaser.Physics.Arcade.Body)}
172+
* @type {?(object|Phaser.Physics.Arcade.Body|MatterJS.BodyType)}
173173
* @default null
174174
* @since 3.0.0
175175
*/

0 commit comments

Comments
 (0)