1 decade ago by paulh
Hi All
Ive been trying to make a spawned player entity collide with a moving "baddie" entity but i can t get them to collide ...
This works fine, the baddie generares and collides:
When i add this it no longer collides?
Ive been trying to make a spawned player entity collide with a moving "baddie" entity but i can t get them to collide ...
This works fine, the baddie generares and collides:
animSheet: new ig.AnimationSheet( 'media/320x480/hats.png', 32, 32 ),
bounciness: 1,
init: function( x, y, settings ) {
this.parent( x, y, settings );
this.addAnim( 'idle', 2.1, [0] );
this.vel.x = -240;
this.vel.y = 100;
},
});
When i add this it no longer collides?
update: function() {
// Has the animation completely run through? -> kill it
if( this.currentAnim.loopCount ) {
this.kill();
}
this.currentAnim.update();
return;
}
});
