如何访问内部功能?

问题描述 投票:0回答:0
...
var Game = function () {
  return Phaser.Scene.call(this, "game") || this;
};
$jscomp.inherits(Game, Phaser.Scene);
Game.prototype.create = function () {
  function **fn**(a){
  }
}
...
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);

那么如何访问函数fn呢?那么如何访问函数fn呢?

无法访问功能 fn!

closures phaser phaserjs
© www.soinside.com 2019 - 2024. All rights reserved.