Beispiel #1
0
 public bool Collide(Enemies.Enemy enemy)
 {
     if (enemy.getRectangle().Intersects(new Rectangle((int)position.X, (int)position.Y, width, height)))
     {
         if((enemy.canFly() && flying) || (!enemy.canFly() && ground))
         {
             if (!piercing)
                 isDead = true;
             return true;
         }
     }
     return false;
 }