mirror of
https://github.com/photonstorm/phaser
synced 2025-02-17 06:28:30 +00:00
Merge pull request #3675 from tjb295/master
Bug: #3645 issue with clearing GameObjects from this._list. Called qu…
This commit is contained in:
commit
37f75fd233
1 changed files with 9 additions and 1 deletions
|
@ -367,6 +367,7 @@ var InputPlugin = new Class({
|
|||
|
||||
// Clear the removal list
|
||||
removeList.length = 0;
|
||||
this._pendingRemoval.length = 0;
|
||||
|
||||
// Move pendingInsertion to list (also clears pendingInsertion at the same time)
|
||||
this._list = current.concat(insertList.splice(0));
|
||||
|
@ -386,6 +387,13 @@ var InputPlugin = new Class({
|
|||
{
|
||||
var input = gameObject.input;
|
||||
|
||||
// If GameObject.input already cleared from higher class
|
||||
if(!input)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.queueForRemoval(gameObject);
|
||||
input.gameObject = undefined;
|
||||
input.target = undefined;
|
||||
input.hitArea = undefined;
|
||||
|
@ -1639,7 +1647,7 @@ var InputPlugin = new Class({
|
|||
},
|
||||
|
||||
/**
|
||||
* The Scene that owns this plugin is being destroyed.
|
||||
* The Scene that owns this plugin is being destroyed.
|
||||
* We need to shutdown and then kill off all external references.
|
||||
*
|
||||
* @method Phaser.Input.InputPlugin#destroy
|
||||
|
|
Loading…
Add table
Reference in a new issue