Adele

Members
  • Content Count

    1
  • Joined

  • Last visited

  1. Hi, I'm new to developing games with Phaser3. I am going crazy, for days I have been looking for a way to do a 'double jump'. and I can't ... I found many questions similar to this one here, but none gave me a concrete solution ... I would like the player to double jump if I double-click the 'up' cursor. Please help me. function update() { if (cursors.left.isDown) { player.setVelocityX(-130); player.anims.play('left', true); } else if (cursors.right.isDown) { player.setVelocityX(130); player.anims.play('right', true); } else { player.setVelocityX(0); player.anims.play('idle', true); } if (cursors.up.isDown && player.body.touching.down) { layer.setVelocityY('100'); } }