Is there an way to detect an overlap within an update loop if statement?
My specific scenario is between a player sprite, and a group of sprites ( enemies).
Any answers are great!
if (this.physics.overlap(sprite, group)) {
// …
}
or
this.physics.overlap(sprite, group, function (_sprite, spriteInGroup)) {
// …
});