Ejemplo n.º 1
0
        protected override bool CollideWithHitbox(Hitbox mask)
        {
            if(((Position.X > mask.Position.X) && (Position.X < mask.Position.X + mask.Width)) ||
                ((Position.X + Width> mask.Position.X) && (Position.X + Width < mask.Position.X + mask.Width)))
            {
                if (((Position.Y > mask.Position.Y) && (Position.Y < mask.Position.Y + mask.Width)) ||
                    ((Position.Y + Width > mask.Position.Y) && (Position.Y + Width < mask.Position.Y + mask.Width)))
                {
                    return true;
                }
            }

            return false;
        }
Ejemplo n.º 2
0
 protected virtual bool CollideWithHitbox(Hitbox mask)
 {
     return false;
 }