nothing Posted August 1, 2017 Report Share Posted August 1, 2017 update(){ game.physics.arcade.overlap(weapon.bullets, platforms, ballHitBrick); } function ballHitBrick() { weapon.killAll(); } Hello, I have problem with this function. This function is activated when the bullet hits the wall, but it's kill all the bullet in the air and I Want to kill only this one bullet what hits the wall. Quote Link to comment Share on other sites More sharing options...
samid737 Posted August 1, 2017 Report Share Posted August 1, 2017 You can add parameters to your callBack function to do things with the overlapping objects(they are passed as arguments in the same order): update(){ game.physics.arcade.overlap(weapon.bullets, platforms, ballHitBrick); } function ballHitBrick(bullet,platform) { bullet.kill(); } Quote Link to comment Share on other sites More sharing options...
nothing Posted August 1, 2017 Author Report Share Posted August 1, 2017 Thank you very much. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.