Skip to content

Commit 67a6fa8

Browse files
committed
Added jsdocs and property
1 parent d260643 commit 67a6fa8

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/physics/matter-js/MatterGameObject.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function hasGetterOrSetter (def)
3232
* @param {Phaser.Physics.Matter.World} world - The Matter world to add the body to.
3333
* @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will have the Matter body applied to it.
3434
* @param {(object|MatterJS.Body)} [options] - A Matter Body configuration object, or an instance of a Matter Body.
35-
* @param {boolean} [addToWorld=true] - Add this Matter Body to the World?
35+
* @param {boolean} [addToWorld=true] - Should the newly created body be immediately added to the World?
3636
*
3737
* @return {Phaser.GameObjects.GameObject} The Game Object that was created with the Matter body.
3838
*/
@@ -104,6 +104,8 @@ var MatterGameObject = function (world, gameObject, options, addToWorld)
104104
{
105105
shape = 'rectangle';
106106
}
107+
108+
options.addToWorld = addToWorld;
107109

108110
gameObject.setBody(shape, options);
109111
}

0 commit comments

Comments
 (0)