1 decade ago by kwikshot
I have an EntityPlayer class with collision code that looks like this:
collides: ig.Entity.COLLIDES.PASSIVE,
collideWith: function (other, axis) {
console.log('hey');
}
and an EntityEnemy class with collision code that looks like this:
collides: ig.Entity.COLLIDES.PASSIVE,
For some reason, collideWith() is never called even when they collide, but if I set up the entities type and checkAgainst, check() is called, and I can't really understand why.
[player.js http://pastebin.com/5C6GiRKF]
[enemy.js http://pastebin.com/djbmaJPJ]
collides: ig.Entity.COLLIDES.PASSIVE,
collideWith: function (other, axis) {
console.log('hey');
}
and an EntityEnemy class with collision code that looks like this:
collides: ig.Entity.COLLIDES.PASSIVE,
For some reason, collideWith() is never called even when they collide, but if I set up the entities type and checkAgainst, check() is called, and I can't really understand why.
[player.js http://pastebin.com/5C6GiRKF]
[enemy.js http://pastebin.com/djbmaJPJ]