Device.crosswalk detects if your game is running under Intels Crosswalk XDK.

This commit is contained in:
photonstorm 2014-04-14 16:40:14 +01:00
parent e9cb345261
commit 055cb8058d
2 changed files with 15 additions and 3 deletions

View file

@ -67,6 +67,7 @@ Version 2.0.4 - "Mos Shirare" - in development
* Loader now has an onFileStart event you can listen for (thanks @codevinsky, #705)
* Timer.clearPendingEvents will purge any events marked for deletion, this is run automatically at the start of the update loop.
* Device.crosswalk detects if your game is running under Intels Crosswalk XDK.
### Bug Fixes

View file

@ -39,11 +39,17 @@ Phaser.Device = function (game) {
this.cocoonJS = false;
/**
* @property {boolean} ejecta - Is the game running under Ejecta?
* @default
*/
* @property {boolean} ejecta - Is the game running under Ejecta?
* @default
*/
this.ejecta = false;
/**
* @property {boolean} crosswalk - Is the game running under the Intel Crosswalk XDK?
* @default
*/
this.crosswalk = false;
/**
* @property {boolean} android - Is running on android?
* @default
@ -602,6 +608,11 @@ Phaser.Device.prototype = {
this.ejecta = true;
}
if (/Crosswalk/.test(ua))
{
this.crosswalk = true;
}
},
/**