Skip to content

Commit 5344d39

Browse files
committed
Better Group docs. Fix phaserjs#5011
1 parent 4af38a4 commit 5344d39

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

src/physics/arcade/PhysicsGroup.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,19 @@ var IsPlainObject = require('../../utils/object/IsPlainObject');
1515
* @classdesc
1616
* An Arcade Physics Group object.
1717
*
18-
* All Game Objects created by or added to this Group will automatically be given dynamic Arcade Physics bodies (if they have no body)
19-
* and the bodies will receive the Group's {@link Phaser.Physics.Arcade.Group#defaults default values}.
18+
* The primary use of a Physics Group is a way to collect together physics enable objects
19+
* that share the same intrinsic structure into a single pool. They can they be easily
20+
* compared against other Groups, or Game Objects.
2021
*
21-
* Its static counterpart is {@link Phaser.Physics.Arcade.StaticGroup}.
22+
* All Game Objects created by, or added to this Group will automatically be given **dynamic**
23+
* Arcade Physics bodies (if they have no body already) and the bodies will receive the
24+
* Groups {@link Phaser.Physics.Arcade.Group#defaults default values}.
25+
*
26+
* You should not pass objects into this Group that should not receive a body. For example,
27+
* do not add basic Geometry or Tilemap Layers into a Group, as they will not behave in the
28+
* way you may expect. Groups should all ideally have objects of the same type in them.
29+
*
30+
* If you wish to create a Group filled with Static Bodies, please see {@link Phaser.Physics.Arcade.StaticGroup}.
2231
*
2332
* @class Group
2433
* @extends Phaser.GameObjects.Group

0 commit comments

Comments
 (0)