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; }
internal bool IntersectsWith(Rect rect) { throw new NotImplementedException(); }
internal bool Contains(Rect bounds) { throw new NotImplementedException(); }
public bool Contains(Rect rect) { return (X <= rect.X && Y <= rect.Y && X + Width >= rect.X+ rect.Width&& Y + Height >= rect.Y + rect.Height); }
public bool IntersectsWith(Rect rect) { return (rect.Left <= Right) && (rect.Right>= Left) && (rect.Top<= Bottom) && (rect.Bottom>= Top); }