mirror of
https://github.com/photonstorm/phaser
synced 2024-12-11 22:03:09 +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
|
||||||
|
@ -662,6 +668,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")
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue