1 decade ago by dmen
I have a bullet entity like so:
EntityBullet = ig.Entity.extend({
collides: ig.Entity.COLLIDES.PASSIVE,
checkAgainst: ig.Entity.TYPE.B,
and I have a check function declared after update:
check: function (other) {
alert('check'+other);
this.parent();
},
Then I have a tree entity. It's set like so:
collides: ig.Entity.COLLIDES.FIXED,
type: ig.Entity.TYPE.B,
So, tree's type is B and bullet collidesWith type B... however I never get a trace with ig.log or an alert as shown...
What am I doing wrong?
EntityBullet = ig.Entity.extend({
collides: ig.Entity.COLLIDES.PASSIVE,
checkAgainst: ig.Entity.TYPE.B,
and I have a check function declared after update:
check: function (other) {
alert('check'+other);
this.parent();
},
Then I have a tree entity. It's set like so:
collides: ig.Entity.COLLIDES.FIXED,
type: ig.Entity.TYPE.B,
So, tree's type is B and bullet collidesWith type B... however I never get a trace with ig.log or an alert as shown...
What am I doing wrong?