Jump to content

as "detect" the collision of a sprite with the edges of my canvas


lrodriguez
 Share

Recommended Posts

Thanks for your answers, I thought I had a role in phaser that permitted me to do this, but I see no, what I've done is the following

 

 

function verificarColisionWorld() {

    var alto = innerHeight;

    if (miestrella.y > alto - 40) {

        miestrella.destroy();

    }

    if (midiamante.y > alto - 40) {

        midiamante.destroy();

    }

}

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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