mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 15:12:18 +00:00
Time.reset does a removeAll on any Timers.
Device no longer things a Windows Phone or Windows Tablet are desktop devices (thanks wombatbuddy, fixes #506)
This commit is contained in:
parent
664d5b3e2c
commit
7ff4e51ab1
3 changed files with 23 additions and 1 deletions
|
@ -131,6 +131,7 @@ New features:
|
|||
* Group.sendToBottom(child) is the handy opposite of Group.bringToTop()
|
||||
* Group.moveUp(child) will move a child up the display list, swapping with the child above it.
|
||||
* Group.moveDown(child) will move a child down the display list, swapping with the child below it.
|
||||
* Device.windowsPhone is now tested for.
|
||||
|
||||
|
||||
Updates:
|
||||
|
@ -192,6 +193,7 @@ Bug Fixes:
|
|||
* Calling destroy while in an Input Event callback now works for either the parent Group or the calling object itself.
|
||||
* Loader.replaceInFileList wouldn't over-write the previous entry correctly, which caused the Loader.image overwrite parameter to fail (thanks basoko, fixes #493)
|
||||
* If the game was set to NO_SCALE and you swapped orientation, it would pause and resize, then fail to resize when you swapped back (thanks starnut, fixes #258)
|
||||
* Device no longer things a Windows Phone or Windows Tablet are desktop devices (thanks wombatbuddy, fixes #506)
|
||||
|
||||
|
||||
TO DO:
|
||||
|
|
|
@ -81,6 +81,12 @@ Phaser.Device = function (game) {
|
|||
*/
|
||||
this.windows = false;
|
||||
|
||||
/**
|
||||
* @property {boolean} windowsPhone - Is running on a Windows Phone?
|
||||
* @default
|
||||
*/
|
||||
this.windowsPhone = false;
|
||||
|
||||
// Features
|
||||
|
||||
/**
|
||||
|
@ -398,6 +404,11 @@ Phaser.Device.prototype = {
|
|||
else if (/Windows/.test(ua))
|
||||
{
|
||||
this.windows = true;
|
||||
|
||||
if (/Windows Phone/i.test(ua))
|
||||
{
|
||||
this.windowsPhone = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.windows || this.macOS || (this.linux && this.silk === false))
|
||||
|
@ -405,6 +416,12 @@ Phaser.Device.prototype = {
|
|||
this.desktop = true;
|
||||
}
|
||||
|
||||
// Windows Phone / Table reset
|
||||
if (this.windowsPhone || ((/Windows NT/i.test(ua)) && (/Touch/i.test(ua))))
|
||||
{
|
||||
this.desktop = false;
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -362,12 +362,15 @@ Phaser.Time.prototype = {
|
|||
},
|
||||
|
||||
/**
|
||||
* Resets the private _started value to now.
|
||||
* Resets the private _started value to now and removes all currently running Timers.
|
||||
*
|
||||
* @method Phaser.Time#reset
|
||||
*/
|
||||
reset: function () {
|
||||
|
||||
this._started = this.now;
|
||||
this.removeAll();
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue