Jump to content

Federayk

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by Federayk

  1. In my case, when I add my "character" or "player" with him animations (walking, jumping, attack, etc) I need all the spritesheets in one image .png, so try to link all your spritesheets in one image. That's works me.
  2. Oh! After to ckeck that, I turn this.player.touching.down to this.player.blocked.down and that's work! Thank you so much!
  3. Hi! I tried that but it still doesn't work ? When I turned -= 300 to = -300 in this.player.body.velocity.x as well as in this.player.body.velocity.y But nothing has been changed. The player don't jump when is touching the ground as well as when is not touching the ground. In both cases nothing happens.
  4. Hi guys! I'm new on Phaser (I use 2 version). I was create a placeholder and when I set movement of the player, specifically in the jump, doesn't work. Everything works but expect the jump. I let one fragment of the code and also the file. I couldn't find solution for now. I will be grateful with any help. Thank you! :) update:function(){ //COLLISION PLAYER AND TILESLAYER game.physics.arcade.collide(this.player, this.layer); //MOVEMENT OF PLAYER this.player.body.velocity.x = 0; if (this.cursors.left.isDown) { this.player.body.velocity.x -= 300 this.player.animations.play('walking.l'); } else if (this.cursors.right.isDown) { this.player.body.velocity.x += 300; this.player.animations.play('walking.r') } else { //PLAYER DON'T MOVE this.player.body.velocity.x = 0 this.player.frame = 0; this.player.animations.stop(); } //JUMP if (this.cursors.up.isDown && this.player.body.touching.down) { this.player.body.velocity.y -= 120; } liquidadores.rar
×
×
  • Create New...