mirror of
https://github.com/wassname/phaser.git
synced 2026-09-10 12:29:30 +08:00
Sprite vs. Sprite Group Body Tests.
This commit is contained in:
+21
-15
@@ -96,6 +96,11 @@ Phaser.Group = function (game, parent, name, useStage) {
|
||||
*/
|
||||
this.scale = this._container.scale;
|
||||
|
||||
/**
|
||||
* @property {Phaser.Point} pivot - The pivot point of the Group container.
|
||||
*/
|
||||
this.pivot = this._container.pivot;
|
||||
|
||||
/**
|
||||
* The cursor is a simple way to iterate through the objects in a Group using the Group.next and Group.previous functions.
|
||||
* The cursor is set to the first child added to the Group and doesn't change unless you call next, previous or set it directly with Group.cursor.
|
||||
@@ -164,14 +169,14 @@ Phaser.Group.prototype = {
|
||||
{
|
||||
child.group = this;
|
||||
|
||||
this._container.addChild(child);
|
||||
|
||||
child.updateTransform();
|
||||
|
||||
if (child.events)
|
||||
{
|
||||
child.events.onAddedToGroup.dispatch(child, this);
|
||||
}
|
||||
|
||||
this._container.addChild(child);
|
||||
|
||||
child.updateTransform();
|
||||
}
|
||||
|
||||
if (this.cursor === null)
|
||||
@@ -209,14 +214,14 @@ Phaser.Group.prototype = {
|
||||
{
|
||||
child.group = this;
|
||||
|
||||
this._container.addChildAt(child, index);
|
||||
|
||||
child.updateTransform();
|
||||
|
||||
if (child.events)
|
||||
{
|
||||
child.events.onAddedToGroup.dispatch(child, this);
|
||||
}
|
||||
|
||||
this._container.addChildAt(child, index);
|
||||
|
||||
child.updateTransform();
|
||||
}
|
||||
|
||||
if (this.cursor === null)
|
||||
@@ -265,15 +270,15 @@ Phaser.Group.prototype = {
|
||||
child.visible = exists;
|
||||
child.alive = exists;
|
||||
|
||||
this._container.addChild(child);
|
||||
|
||||
child.updateTransform();
|
||||
|
||||
if (child.events)
|
||||
{
|
||||
child.events.onAddedToGroup.dispatch(child, this);
|
||||
}
|
||||
|
||||
this._container.addChild(child);
|
||||
|
||||
child.updateTransform();
|
||||
|
||||
if (this.cursor === null)
|
||||
{
|
||||
this.cursor = child;
|
||||
@@ -307,14 +312,15 @@ Phaser.Group.prototype = {
|
||||
child.visible = exists;
|
||||
child.alive = exists;
|
||||
|
||||
this._container.addChild(child);
|
||||
|
||||
child.updateTransform();
|
||||
|
||||
if (child.events)
|
||||
{
|
||||
child.events.onAddedToGroup.dispatch(child, this);
|
||||
}
|
||||
|
||||
this._container.addChild(child);
|
||||
child.updateTransform();
|
||||
|
||||
if (this.cursor === null)
|
||||
{
|
||||
this.cursor = child;
|
||||
|
||||
Reference in New Issue
Block a user