【发布时间】:2018-08-17 14:21:56
【问题描述】:
我是 Phaser 的新手,我在这里学习本教程:https://phaser.io/tutorials/making-your-first-phaser-3-game/part7
在手机浏览器上使用需要更改哪些内容才能让播放器在点击屏幕时自动向右运行并跳转?我已经搜索了很长时间,但找不到答案,正在努力学习
// Input Events
cursors = this.input.keyboard.createCursorKeys();
if (cursors.left.isDown)
{
player.setVelocityX(-160);
player.anims.play('left', true);
}
else if (cursors.right.isDown)
{
player.setVelocityX(160);
player.anims.play('right', true);
}
else
{
player.setVelocityX(0);
player.anims.play('turn');
}
if (cursors.up.isDown && player.body.touching.down)
{
player.setVelocityY(-330);
}
【问题讨论】:
标签: phaser-framework