viperwar Posted July 9, 2014 Share Posted July 9, 2014 hello guys when i put this code to my little game , the game going to be freeze! i just want to set that when player collide with enemies , the player destroy. how can i do this ? here is my full code : http://jsfiddle.net/4WuFJ/ and this is the code that freezing my game : game.physics.arcade.collide(plane, enemies, collisionHandler, null, this); game.physics.arcade.collide(enemies, enemies); function collisionHandler() { plane.destroy(); } Link to comment Share on other sites More sharing options...
Recommended Posts