Exemplo n.º 1
0
        /// <summary>
        /// Sets the bounds with a body.
        /// </summary>
        /// <param name="body">The body.</param>
        public void SetBoundsWithBody(Body body)
        {
            if (body == null)
            {
                HoverBounds = Rectangle.Empty;
                return;
            }

            HoverBounds = VectorUtils.AddRectanglesAsPadding(VectorUtils.VectorsToRectangle(ConvertUnits.ToDisplayUnits(body.Position), VectorUtils.GetSizeFromShape(body.FixtureList[0].Shape)), PADDING);
        }