Exemplo n.º 1
0
        /// <summary>
        /// Draws the bodies in the world.
        /// </summary>
        /// <param name="g">The graphics surface to draw on.</param>
        public void Draw(Graphics g)
        {
            Pen treePen = new Pen(new SolidBrush(Color.FromArgb(100, Color.Red)));
            Pen bodyPen = new Pen(new SolidBrush(Color.FromArgb(100, Color.Red)));


            for (int i = 0; i < _bodies.Length; i++)
            {
                Body body = _bodies[i];
                if (body != null)
                {
                    body.Draw(g, _renderer);
                }
            }

            if (DrawTree)
            {
                _tree.Draw(g, _renderer);
            }
        }