Jump to content

Collision problem


viperwar
 Share

Recommended Posts

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

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...