Strutyk

Members
  • Content count

    4
  • Joined

  • Last visited

  1. Play sound when key pressed

    No, same result. Plus in this variant can't stop fly
  2. Play sound when key pressed

    Hi all. I have a problem managing the ghost character. I need that when the left button is pressed - the character flies to the left up, and play fly sound. But when the right button is pressed while the left button is pressed, the character stopped and stopped playing fly sound. if (this.leftKey.isDown) { //Play Fly sound, when LEFT key is pressed this.playFlySound(); this.ghost.body.moves = true; this.ghost.body.velocity.x = -120; this.ghost.body.velocity.y = -160; //Stop Fly sound, when LEFT key is pressed & RIGHT key pressed to if (this.rightKey.isDown) { this.stopFlySound(); this.ghost.body.moves = false; this.ghost.body.velocity.x = 0; this.ghost.body.velocity.y = 0; } } In my version of the code, the fly sound start play when the left button is released. Please help me with the problem.
  3. Scale all except canvas

    I realized, resize can do everything except tilemap
  4. Scale all except canvas

    Hi all. How to scale all(tiles, sprites ect...) except canvas, for game with the width and height of 100% on all devices? game.scale.scaleMode = Phaser.ScaleManager.USER_SCALE;if(game.width < 667){game.scale.setUserScale(0.5,0.5) }