var $jscomp = $jscomp || {};
$jscomp.scope = {};
$jscomp.ASSUME_ES5 = !1;
$jscomp.ASSUME_NO_NATIVE_MAP = !1;
$jscomp.ASSUME_NO_NATIVE_SET = !1;
$jscomp.SIMPLE_FROUND_POLYFILL = !1;
$jscomp.objectCreate =
$jscomp.ASSUME_ES5 || "function" == typeof Object.create
? Object.create
: function (e) {
var m = function () {};
m.prototype = e;
return new m();
};
$jscomp.underscoreProtoCanBeSet = function () {
var e = { a: !0 },
m = {};
try {
return (m.__proto__ = e), m.a;
} catch (w) {}
return !1;
};
$jscomp.setPrototypeOf =
"function" == typeof Object.setPrototypeOf
? Object.setPrototypeOf
: $jscomp.underscoreProtoCanBeSet()
? function (e, m) {
e.__proto__ = m;
if (e.__proto__ !== m) throw new TypeError(e + " is not extensible");
return e;
}
: null;
$jscomp.inherits = function (e, m) {
e.prototype = $jscomp.objectCreate(m.prototype);
e.prototype.constructor = e;
if ($jscomp.setPrototypeOf) {
var w = $jscomp.setPrototypeOf;
w(e, m);
} else
for (w in m)
if ("prototype" != w)
if (Object.defineProperties) {
var B = Object.getOwnPropertyDescriptor(m, w);
B && Object.defineProperty(e, w, B);
} else e[w] = m[w];
e.superClass_ = m.prototype;
};
var Game = function () {
return Phaser.Scene.call(this, "game") || this;
};
$jscomp.inherits(Game, Phaser.Scene);
Game.prototype.create = function () {
this.someFunctionName = fn;
function fn(a) {
dosomething...
}
}
var config = {
type: Phaser.WEBGL,
transparent: !0,
width: 720,
height: 1080,
scale: {
mode: Phaser.Scale.FIT,
parent: "game_content",
autoCenter: Phaser.Scale.CENTER_BOTH,
},
scene: [Boot, Load, Menu, Level, Game],
},
game = new Phaser.Game(config);
game.create();
console.log(game.someFunctionName());
So how to access the function fn? So how to access the function fn?
Can't access the function fn! Got this error "caught TypeError: game.create is not a function". I just want to use the fn function outsider.
Can't access the function fn! Got this error "caught TypeError: game.create is not a function". I just want to use the fn function outsider.