Jump to content

Search the Community

Showing results for tags 'phaser 2.3.0'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 2 results

  1. I'm having a problem in my game that i cant make my player jump when he is on an platform. Can anyone help me, here is the code (i dont know what part is wrong so i'll put the full code) Ps: I'm using phaser 2.3.0, and i dont speak english very well, so sorry if i write something wrong. game.physics.startSystem(Phaser.Physics.ARCADE); game.stage.backgroundColor = '#000000'; game.world.setBounds(0, 0, 4000, 400); campo = game.add.tileSprite(0, 0, 4000, 400, 'fundo'); cursors = game.input.keyboard.createCursorKeys(); jumpButton = game.input.keyboard.addKey(Phaser.Keyboard.SPACEBAR); game.physics.arcade.gravity.y = 100; player = game.add.sprite(100,300 , 'boneco'); game.physics.arcade.enable(player) player.body.collideWorldBounds =true; player.animations.add('frente' , [0,1,2], 4); player.animations.add('tras' , [3,4,5], 4); player.animations.add('puloe' , [6]); player.animations.add('pulod' , [7]); player.animations.add('parado' , [8]); game.camera.follow(player); platforms = this.add.physicsGroup();platforms.create(50, 350, 'terra');platforms.create(200, 180, 'terra');platforms.create(400, 296, 'terra');platforms.create(600, 412, 'terra');platforms.setAll('body.allowGravity', false);platforms.setAll('body.immovable', true);platforms.setAll('body.velocity.x', 0)platforms.setAll('body.velocity.y', 0)platforms.setAll('body.collideWorldBounds', true); }, update: function () { player.body.bounce.y = 0.2; player.body.gravity.y = 200; player.body.velocity.x = 0; if (cursors.left.isDown) {player.body.velocity.x = -150; if (facing != 'left') { player.animations.play('tras'); facing = 'left'; }} else if (cursors.right.isDown) {player.body.velocity.x = 150; if (facing != 'right') { player.animations.play('frente'); facing = 'right'; } } else {if (facing != 'idle') {player.animations.play('parado'); facing = 'idle';}} if (jumpButton.isDown && player.body.onFloor() && game.time.now > jumpTimer) { player.body.velocity.y = -250; jumpTimer = game.time.now + 750;} if (jumpButton.isDown && player.body.onFloor() && game.time.now > jumpTimer) { player.body.velocity.y = -250; jumpTimer = game.time.now + 750;} game.physics.arcade.collide(platforms, player)
  2. Hello, I'm seeing that the physics.arcade.collide between a sprite and a group fires more than once (2-3 times) each time the sprite collides with a group member (the callback says it is the correct and same group member). Is this normal in the new version? Mind that I'm killing and removing the group member the first time of the collision but the next 2-3 times happen anyways. Can anyone confirm that this is happening and whether or not this is normal? Thanks!
×
×
  • Create New...