mirror of
https://github.com/wassname/phaser.git
synced 2026-09-10 12:29:30 +08:00
Physics World events added.
Group has new 'addToWorld' parameter, which fulfills the same function as the old useStage. Stage now extends PIXI.Stage rather than owns one.
This commit is contained in:
+5
-5
@@ -12,9 +12,9 @@
|
||||
* @param {Phaser.Game} game - A reference to the currently running game.
|
||||
* @param {*} parent - The parent Group, DisplayObject or DisplayObjectContainer that this Group will be added to. If undefined or null it will use game.world.
|
||||
* @param {string} [name=group] - A name for this Group. Not used internally but useful for debugging.
|
||||
* @param {boolean} [useStage=false] - Should this Group be added to the World (default, false) or direct to the Stage (true).
|
||||
* @param {boolean} [addToStage=false] - If set to true this Group will be added directly to the Game.Stage instead of Game.World.
|
||||
*/
|
||||
Phaser.Group = function (game, parent, name, useStage) {
|
||||
Phaser.Group = function (game, parent, name, addToStage) {
|
||||
|
||||
/**
|
||||
* @property {Phaser.Game} game - A reference to the currently running Game.
|
||||
@@ -33,7 +33,7 @@ Phaser.Group = function (game, parent, name, useStage) {
|
||||
|
||||
PIXI.DisplayObjectContainer.call(this);
|
||||
|
||||
if (typeof useStage === 'undefined')
|
||||
if (typeof addToStage === 'undefined')
|
||||
{
|
||||
if (parent)
|
||||
{
|
||||
@@ -41,12 +41,12 @@ Phaser.Group = function (game, parent, name, useStage) {
|
||||
}
|
||||
else
|
||||
{
|
||||
this.game.stage._stage.addChild(this);
|
||||
this.game.stage.addChild(this);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.game.stage._stage.addChild(this);
|
||||
this.game.stage.addChild(this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user