Skip to content

Commit a7b93b3

Browse files
committed
Tidying up and added physicsType.
1 parent beee4b9 commit a7b93b3

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

v3/src/physics/arcade/PhysicsGroup.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ var Class = require('../../utils/Class');
55
var CONST = require('./const');
66
var GetFastValue = require('../../utils/object/GetFastValue');
77
var Group = require('../../gameobjects/group/Group');
8-
var PhysicsEvent = require('./events');
98

109
var PhysicsGroup = new Class({
1110

@@ -31,6 +30,8 @@ var PhysicsGroup = new Class({
3130
config.removeCallback = this.removeCallback;
3231
config.classType = ArcadeSprite;
3332

33+
this.physicsType = CONST.DYNAMIC_BODY;
34+
3435
this.defaults = {
3536
setCollideWorldBounds: GetFastValue(config, 'collideWorldBounds', false),
3637
setAccelerationX: GetFastValue(config, 'accelerationX', 0),
@@ -49,7 +50,7 @@ var PhysicsGroup = new Class({
4950
setAngularAcceleration: GetFastValue(config, 'angularAcceleration', 0),
5051
setAngularDrag: GetFastValue(config, 'angularDrag', 0),
5152
setMass: GetFastValue(config, 'mass', 1),
52-
setImmovable: GetFastValue(config, 'immovable', false),
53+
setImmovable: GetFastValue(config, 'immovable', false)
5354
};
5455

5556
Group.call(this, scene, children, config);
@@ -59,7 +60,7 @@ var PhysicsGroup = new Class({
5960
{
6061
if (!child.body)
6162
{
62-
this.world.enableBody(child);
63+
this.world.enableBody(child, CONST.DYNAMIC_BODY);
6364
}
6465

6566
var body = child.body;

0 commit comments

Comments
 (0)