Count entities player is touching
var count = 0; | |
for(var i=0; i<ig.game.entities.length; i++) { | |
if(ig.game.player.touches(ig.game.entities[i])) { | |
count++; | |
} | |
} | |
console.log(count); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment