mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 05:33:35 +00:00
You can now optionally set if the objects are added to the physics world.
This commit is contained in:
parent
7c29eab78c
commit
1ae7237f73
2 changed files with 8 additions and 2 deletions
|
@ -54,7 +54,10 @@ var MatterImage = new Class({
|
|||
|
||||
this.world = world;
|
||||
|
||||
world.add(this.body);
|
||||
if (GetFastValue(options, 'addToWorld', true))
|
||||
{
|
||||
world.add(this.body);
|
||||
}
|
||||
|
||||
this.setPosition(x, y);
|
||||
}
|
||||
|
|
|
@ -57,7 +57,10 @@ var MatterSprite = new Class({
|
|||
|
||||
this.world = world;
|
||||
|
||||
world.add(this.body);
|
||||
if (GetFastValue(options, 'addToWorld', true))
|
||||
{
|
||||
world.add(this.body);
|
||||
}
|
||||
|
||||
this.setPosition(x, y);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue