mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 13:43:26 +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;
|
||||
|
||||
if (GetFastValue(options, 'addToWorld', true))
|
||||
{
|
||||
world.add(this.body);
|
||||
}
|
||||
|
||||
this.setPosition(x, y);
|
||||
}
|
||||
|
|
|
@ -57,7 +57,10 @@ var MatterSprite = new Class({
|
|||
|
||||
this.world = world;
|
||||
|
||||
if (GetFastValue(options, 'addToWorld', true))
|
||||
{
|
||||
world.add(this.body);
|
||||
}
|
||||
|
||||
this.setPosition(x, y);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue