Anshu Posted July 18, 2015 Share Posted July 18, 2015 Hi Guys, I am new to phaser, just have started working with phaser 3 days ago. previously i have worked in Flixel. I am working on a Game prototype where i am creating sprites(test1,test2,test3,test4) and adding them to group "answer_ball_group" Now i want that when the bullet hit any one of the test ball of the of "answer_ball_group". it should kill all the test ball in the group. My collide functio:--game.physics.arcade.collide(bullets, answer_ball_group, collisionHandler, null, this); function collisionHandler (bullet, answer_ball_group) { answer_ball_group.kill(); } if i am putting the code like this function collisionHandler (bullet, ball) { ball.kill(); } The collisionhandler is killing the ball that collided, but i want to kill all the balls.. Please help. Thanks in Avance. 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.