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); }
abstract public bool RectangleCollision(SpriteAbstract otherSprite);