Ejemplo n.º 1
0
 public override bool RectangleCollision(SpriteAbstract otherSprite)
 {
     if (this.X < otherSprite.X - otherSprite.Texture.Width * otherSprite.Scale / 3)
     {
         return(false);
     }
     if (this.Y + this.Texture.Height * this.Scale * HITBOXSCALE / 2 < otherSprite.Y - otherSprite.Texture.Height * otherSprite.Scale / 2)
     {
         return(false);
     }
     if (this.X > otherSprite.X + otherSprite.Texture.Width * otherSprite.Scale / 3)
     {
         return(false);
     }
     if (this.Y - this.Texture.Height * this.Scale * HITBOXSCALE / 2 > otherSprite.Y + otherSprite.Texture.Height * otherSprite.Scale / 2)
     {
         return(false);
     }
     return(true);
 }
Ejemplo n.º 2
0
 abstract public bool RectangleCollision(SpriteAbstract otherSprite);