//------------------------------------------------------------------ public bool Intersects(Bounds bounds) { var @from = new Vector2 (Rectangle.X, Rectangle.Y); var to = new Vector2 (Rectangle.X + Rectangle.Width, Rectangle.Y + Rectangle.Height); // new Tools.Markers.Rectangle (@from, to); return Rectangle.Intersects (bounds.Rectangle); }
//------------------------------------------------------------------ private void Destroy() { Velocity = 0; Lives = 0; Bounds = null; Components.Clear (); Delete (); }
//------------------------------------------------------------------ private void CreateBoundingBox() { Bounds = new Bounds (this, Position, Drawable.Origin); Bounds.Inflate (-5, -5); Add (Bounds); }