Phaser,文本在linux系统上不起作用

时间:2018-01-05 07:31:47

标签: javascript phaser-framework

var dat4 = game.cache.getJSON('hint');
if (dat4.type == 'hint') {
  var myText = dat4.data[0].message;
  // alert(myText);
  this.instructions = this.add.text(game.world.centerX, game.world.centerY,
    myText, {
      font: '50px lato',
      fill: '#f5f5f5',
      align: 'center'
    }
  );
  this.instructions.stroke = "#7f34de";
  this.instructions.strokeThickness = 16;
  //  Apply the shadow to the Stroke only
  this.instructions.setShadow(1, 1, "#333333", 1, true, false);
  this.instructions.anchor.setTo(0.5, 0.5);
  this.time.events.add(3000, this.instructions.destroy, this.instructions);
  alert(myText);
}
{
    "type": "hint",
    "data": [
        {
            "message": "xxxxxxxx"
        }
    ]
}

我把这段代码放在我的.js文件中。当我在计算机上运行时,它的性能很好,但在服务器上却无法正常工作。你能帮我吗?

0 个答案:

没有答案