Jump to content

Do not work impact event


MXPain
 Share

Recommended Posts

Hi guys, I have not worked ImpactEvents handler prompt in what may be the case:

for(var i=0; i<enemies.length; i++)        {            for(var j=0; j<borders.length; j++) {                enemies[i].body.createBodyCallback(borders[j], this.hitEnemy, this);            }        }        game.physics.p2.setImpactEvents(true);
 hitEnemy: function(body1, body2)    {        console.log('collide borders with enemy');    },
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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