mirror of
https://github.com/photonstorm/phaser
synced 2025-02-17 06:28:30 +00:00
Device.crosswalk detects if your game is running under Intels Crosswalk XDK.
This commit is contained in:
parent
e9cb345261
commit
055cb8058d
2 changed files with 15 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue