mirror of
https://github.com/photonstorm/phaser
synced 2025-03-02 14:27: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;
|
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?
|
* @property {boolean} cordova - Is the game running under Apache Cordova?
|
||||||
* @default
|
* @default
|
||||||
|
@ -663,6 +669,15 @@ Phaser.Device.prototype = {
|
||||||
this.cocoonJS = true;
|
this.cocoonJS = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(this.cocoonJS)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
this.cocoonJSApp = (typeof CocoonJS !== "undefined");
|
||||||
|
} catch(error) {
|
||||||
|
this.cocoonJSApp = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof window.ejecta !== "undefined")
|
if (typeof window.ejecta !== "undefined")
|
||||||
{
|
{
|
||||||
this.ejecta = true;
|
this.ejecta = true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue