public override void DetectEnemyHit(MovingObject mob) { //dont kill friends if (mob.Type == this.Type) return; //collision with enemy detected if(Position.Y > mob.Position.Y) { //enemy is above, cant kill return; } mob.Die(); }
public override void DetectEnemyHit(MovingObject mob) { //collision with enemy detected if (Position.Y < mob.Position.Y - mob.Height / 10) { //hit enemy from above mob.Die(); Score += 100; //bounce off of enemy CanJump = true; Jump(); } else { Die(); } }
public virtual void DetectEnemyHit(MovingObject mob) { }