mirror of
https://github.com/wassname/phaser.git
synced 2026-08-14 12:40:17 +08:00
Heavily optimised PixiShader.
This commit is contained in:
+13
-1
@@ -1190,15 +1190,25 @@ Phaser.Group.prototype = {
|
||||
*
|
||||
* @method Phaser.Group#remove
|
||||
* @param {Any} child - The child to remove.
|
||||
* @return {boolean} true if the child was removed from this Group, otherwise false.
|
||||
*/
|
||||
remove: function (child) {
|
||||
|
||||
if (child.group !== this)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (child.events)
|
||||
{
|
||||
child.events.onRemovedFromGroup.dispatch(child, this);
|
||||
}
|
||||
|
||||
this._container.removeChild(child);
|
||||
// Check it's actually in the container
|
||||
if (child.parent === this._container)
|
||||
{
|
||||
this._container.removeChild(child);
|
||||
}
|
||||
|
||||
if (this.cursor == child)
|
||||
{
|
||||
@@ -1214,6 +1224,8 @@ Phaser.Group.prototype = {
|
||||
|
||||
child.group = null;
|
||||
|
||||
return true;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user