mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 13:43:26 +00:00
Merge branch 'master' of https://github.com/photonstorm/phaser
This commit is contained in:
commit
996ba89e4b
4 changed files with 56 additions and 1 deletions
|
@ -1284,6 +1284,40 @@ var Camera = new Class({
|
|||
this._bounds = null;
|
||||
|
||||
this.scene = null;
|
||||
},
|
||||
|
||||
/**
|
||||
* The x position of the center of the Camera's viewport, relative to the top-left of the game canvas.
|
||||
*
|
||||
* @name Phaser.Cameras.Scene2D.Camera#centerX
|
||||
* @type {number}
|
||||
* @readOnly
|
||||
* @since 3.10.0
|
||||
*/
|
||||
centerX: {
|
||||
|
||||
get: function ()
|
||||
{
|
||||
return this.x + (0.5 * this.width);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* The y position of the center of the Camera's viewport, relative to the top-left of the game canvas.
|
||||
*
|
||||
* @name Phaser.Cameras.Scene2D.Camera#centerY
|
||||
* @type {number}
|
||||
* @readOnly
|
||||
* @since 3.10.0
|
||||
*/
|
||||
centerY: {
|
||||
|
||||
get: function ()
|
||||
{
|
||||
return this.y + (0.5 * this.height);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
@ -36,6 +36,10 @@ var AddToDOM = function (element, parent, overflowHidden)
|
|||
target = parent;
|
||||
}
|
||||
}
|
||||
else if (element.parentElement)
|
||||
{
|
||||
return element;
|
||||
}
|
||||
|
||||
// Fallback, covers an invalid ID and a non HTMLelement object
|
||||
if (!target)
|
||||
|
|
|
@ -282,6 +282,23 @@ var UpdateList = new Class({
|
|||
|
||||
this.scene = null;
|
||||
this.systems = null;
|
||||
},
|
||||
|
||||
/**
|
||||
* [description]
|
||||
*
|
||||
* @name Phaser.GameObjects.UpdateList#length
|
||||
* @type {integer}
|
||||
* @readOnly
|
||||
* @since 3.10.0
|
||||
*/
|
||||
length: {
|
||||
|
||||
get: function ()
|
||||
{
|
||||
return this._list.length;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
@ -474,7 +474,7 @@ var TweenManager = new Class({
|
|||
{
|
||||
tween = list[i];
|
||||
|
||||
for (var t = 0; t < target.length; i++)
|
||||
for (var t = 0; t < target.length; t++)
|
||||
{
|
||||
if (tween.hasTarget(target[t]))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue