mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 23:20:59 +00:00
Fixed references
This commit is contained in:
parent
a6303aad8c
commit
cdfe2e0ea2
3 changed files with 12 additions and 12 deletions
|
@ -126,7 +126,7 @@ var Container = new Class({
|
|||
* @private
|
||||
* @since 3.4.0
|
||||
*/
|
||||
this.addCallback = this.addHandler;
|
||||
this.addCallback = this.addHandler.bind(this);
|
||||
|
||||
/**
|
||||
* A callback that is invoked every time a child is removed from this list.
|
||||
|
@ -136,7 +136,7 @@ var Container = new Class({
|
|||
* @private
|
||||
* @since 3.4.0
|
||||
*/
|
||||
this.removeCallback = this.removeHandler;
|
||||
this.removeCallback = this.removeHandler.bind(this);
|
||||
|
||||
/**
|
||||
* A reference to the Scene Display List.
|
||||
|
@ -151,9 +151,9 @@ var Container = new Class({
|
|||
this.setPosition(x, y);
|
||||
this.clearAlpha();
|
||||
|
||||
if (Array.isArray(children))
|
||||
if (children)
|
||||
{
|
||||
this.addMultiple(children);
|
||||
this.add(children);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -196,7 +196,7 @@ var Container = new Class({
|
|||
* @param {Phaser.GameObjects.Container} list - The List the Game Object was added to (also this Container)
|
||||
* @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just added to this Container.
|
||||
*/
|
||||
addHandler: function (list, gameObject)
|
||||
addHandler: function (gameObject)
|
||||
{
|
||||
gameObject.on('destroy', this.remove, this);
|
||||
|
||||
|
@ -209,7 +209,7 @@ var Container = new Class({
|
|||
gameObject.parentContainer.remove(gameObject);
|
||||
}
|
||||
|
||||
gameObject.parentContainer = list;
|
||||
gameObject.parentContainer = this;
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -223,9 +223,9 @@ var Container = new Class({
|
|||
* @param {Phaser.GameObjects.Container} list - The List the Game Object was removed from (also this Container)
|
||||
* @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just removed from this Container.
|
||||
*/
|
||||
removeHandler: function (list, gameObject)
|
||||
removeHandler: function (gameObject)
|
||||
{
|
||||
gameObject.off('destroy', list.remove, this);
|
||||
gameObject.off('destroy', this.remove, this);
|
||||
|
||||
if (this.exclusive)
|
||||
{
|
||||
|
|
|
@ -11,7 +11,7 @@ var DeathZone = require('./zones/DeathZone');
|
|||
var EdgeZone = require('./zones/EdgeZone');
|
||||
var EmitterOp = require('./EmitterOp');
|
||||
var GetFastValue = require('../../utils/object/GetFastValue');
|
||||
var GetRandomElement = require('../../utils/array/GetRandomElement');
|
||||
var GetRandom = require('../../utils/array/GetRandom');
|
||||
var HasAny = require('../../utils/object/HasAny');
|
||||
var HasValue = require('../../utils/object/HasValue');
|
||||
var Particle = require('./Particle');
|
||||
|
@ -943,7 +943,7 @@ var ParticleEmitter = new Class({
|
|||
}
|
||||
else if (this.randomFrame)
|
||||
{
|
||||
return GetRandomElement(this.frames);
|
||||
return GetRandom(this.frames);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
var GetTilesWithin = require('./GetTilesWithin');
|
||||
var GetRandomElement = require('../../utils/array/GetRandomElement');
|
||||
var GetRandom = require('../../utils/array/GetRandom');
|
||||
|
||||
/**
|
||||
* Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the
|
||||
|
@ -44,7 +44,7 @@ var Randomize = function (tileX, tileY, width, height, indexes, layer)
|
|||
|
||||
for (i = 0; i < tiles.length; i++)
|
||||
{
|
||||
tiles[i].index = GetRandomElement(indexes);
|
||||
tiles[i].index = GetRandom(indexes);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue