private void _UpdateBounds(float left, float top, ref Rect bounds)
 {
     bounds.Location = new Point(left, top);
     if (BoundsChanged != null)
         BoundsChanged(this, new EventArgs());
 }
 public PhysicalAbility(Rect bounds ,Entity owner)
 {
     _Bounds = bounds;
 }
Exemple #3
0
 internal bool IntersectsWith(Rect rect)
 {
     throw new NotImplementedException();
 }
Exemple #4
0
 internal bool Contains(Rect bounds)
 {
     throw new NotImplementedException();
 }
Exemple #5
0
 public bool Contains(Rect rect)
 {
     return (X <= rect.X &&
             Y <= rect.Y &&
             X + Width >= rect.X+ rect.Width&&
             Y + Height >= rect.Y + rect.Height);
 }
Exemple #6
0
 public bool IntersectsWith(Rect rect)
 {
     return (rect.Left <= Right) &&
           (rect.Right>= Left) &&
           (rect.Top<= Bottom) &&
           (rect.Bottom>= Top);
 }