You can now optionally set if the objects are added to the physics world.

This commit is contained in:
Richard Davey 2017-11-23 16:54:55 +00:00
parent 7c29eab78c
commit 1ae7237f73
2 changed files with 8 additions and 2 deletions

View file

@ -54,7 +54,10 @@ var MatterImage = new Class({
this.world = world;
if (GetFastValue(options, 'addToWorld', true))
{
world.add(this.body);
}
this.setPosition(x, y);
}

View file

@ -57,7 +57,10 @@ var MatterSprite = new Class({
this.world = world;
if (GetFastValue(options, 'addToWorld', true))
{
world.add(this.body);
}
this.setPosition(x, y);
}