Search the Community

Showing results for tags 'double'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Coding and Game Design
  • Frameworks
    • Phaser
    • Pixi.js
    • Babylon.js
    • Panda.js
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Found 3 results

  1. Hi ! I'm new with phaser and i'm making a game, I have trouble with the double jump. I checked the others forum but it doesn't work with my game. I tried this and i checked the count of the jumps with an alert, and i see that it doesn't work bu i don't know why. // DOUBLE JUMP if (player.body.touching.down) // if player touch plateform, he gains his double jump { var jump = 2; } if (cursors.up.isDown && jump==2) { player.body.velocity.y = -400; //jump counter -1 jump--; alert(jump); } if (cursors.up.isDown && jump==1 ) { player.body.velocity.y = -400; jump--; alert(jump); } Thanks.
  2. Audio loop duplicating - Bug?

    Hi there, I've stumbled across some very weird audio behavior and can't seem to avoid it. I'm trying to loop a marker of my audio file, which works well on itself. Whenever pausing and resuming the audio loop at least once however, as soon as the next loop point is reached it will not stop the currently running audio and play from the marker but just add a new layer of audio that plays from the marker instead, while the old one just continues to play. And it keeps doing that for every loop. //Create { this.sfx_music = this.sound.add("key); this.sfx_music.allowMultiple = false; this.sfx_music.addMarker('turbo', 116.8696, 7.3846, 1, true); this.sfx_music.play('turbo'); } unpauseGame: function() { if(this.game.paused) { this.game.paused = false; this.sfx_music.resume(); } }, pauseGame: function() { this.sfx_music.pause(); this.game.paused = true; } Pausing the game without pausing the music doesn't cause this problem, but It's mandatory for me to pause the music when pausing the game.. Could this be a bug in sound.pause() or sound.resume()? I'm using Chrome but I have the same behavior in firefox as well. Please help! Best Zampano
  3. Pointer controls

    Hello, Just starting out with Phaser as a bit of passing time out of work and got a little demo spaceship nicely flying around a big world with some background planets which currently moves its camera via keyboard, the question would be how would I go about to move the world camera with dragging the mouse/pointer? Also, how would I go about detecting a double click/double tap? And lastly even though this works, just seeing if there is a better way to rotate my space ship with tweening then this: var angle = game.physics.angleToPointer(ship, pointer); if (Math.abs(ship.rotation - angle) > Math.PI) { if (angle < 0) { angle = 2 * Math.PI + angle; } else { angle = - 2 * Math.PI + angle; } } var d = Math.abs(ship.rotation - angle) / Math.PI * 1000; rotationTween = game.add.tween(ship).to({ rotation: angle }, d); Thanks a bunch for Phaser as this will be a nice pass time for off work.