示例#1
0
        //------------------------------------------------------------------
        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);
        }
示例#2
0
        //------------------------------------------------------------------
        private void Destroy()
        {
            Velocity = 0;
            Lives = 0;
            Bounds = null;

            Components.Clear ();

            Delete ();
        }
示例#3
0
        //------------------------------------------------------------------
        private void CreateBoundingBox()
        {
            Bounds = new Bounds (this, Position, Drawable.Origin);
            Bounds.Inflate (-5, -5);

            Add (Bounds);
        }