示例#1
0
 public abstract bool Collide(BoxMask mask, float dx = 0, float dy = 0);
示例#2
0
 public bool Intersects(BoxMask mask, float dx = 0, float dy = 0)
 {
     return AbsoluteLeft + dx < mask.AbsoluteRight
         && AbsoluteRight + dx > mask.AbsoluteLeft
         && AbsoluteBottom + dy > mask.AbsoluteTop
         && AbsoluteTop + dy < mask.AbsoluteBottom;
 }
示例#3
0
 public override bool Collide(BoxMask mask, float dx = 0, float dy = 0)
 {
     return mask.Collide(this, -dx, -dy);
 }
示例#4
0
 public override bool Collide(BoxMask mask, float dx = 0, float dy = 0)
 {
     return Intersects(mask, dx, dy);
 }