Jump to content

Search the Community

Showing results for tags 'this.physics.arcade.collide'.

  • 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 1 result

  1. I am in the process of creating a simple game in Phaser, but I am having difficulty with "collecting" objects. I have created a player and a single coin object. var player;var coin; I have them appearing on the screen: player = this.add.sprite(350, this.world.height - 150, 'villan');this.physics.p2.enable(player);player.body.setCircle(22); player.body.fixedRotation=true;player.body.mass = 4; coin = this.add.sprite(450, this.world.height - 450, 'booty');this.physics.p2.enable(coin);coin.body.setCircle(22); coin.body.fixedRotation=true;coin.body.mass = 4;Unfortunately, I have been unsuccessful in making it work so that when the player overlaps the coin- the coin disappears. update: function () { this.physics.arcade.collide(player,coin,this.collectCoin,null,this); collectCoin: function () {coin.kill();},Although game runs, when the player comes in contact with the coin it actually pushes it. Any guidance would be greatly appreciated.
×
×
  • Create New...