mirror of
https://github.com/photonstorm/phaser
synced 2024-12-03 18:10:10 +00:00
commit
5cfb51b656
1 changed files with 15 additions and 0 deletions
|
@ -38,6 +38,12 @@ Phaser.Device = function (game) {
|
|||
*/
|
||||
this.cocoonJS = false;
|
||||
|
||||
/**
|
||||
* @property {boolean} cocoonJSApp - Is this game running with CocoonJS.App?
|
||||
* @default
|
||||
*/
|
||||
this.cocoonJSApp = false;
|
||||
|
||||
/**
|
||||
* @property {boolean} cordova - Is the game running under Apache Cordova?
|
||||
* @default
|
||||
|
@ -662,6 +668,15 @@ Phaser.Device.prototype = {
|
|||
{
|
||||
this.cocoonJS = true;
|
||||
}
|
||||
|
||||
if(this.cocoonJS)
|
||||
{
|
||||
try {
|
||||
this.cocoonJSApp = (typeof CocoonJS !== "undefined");
|
||||
} catch(error) {
|
||||
this.cocoonJSApp = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof window.ejecta !== "undefined")
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue