Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function checkCollisions() {
- allEnemies.forEach(function(enemy) {
- if (player.x == enemy.x && player.y == enemy.y) {
- //Enemy and player collide! Do something here
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement