Пример #1
0
        public void DebugDraw(DebugRenderer renderer, float elapsedSeconds, float totalSeconds)
        {
            Vector2 position        = Entity.Body.Position;
            Vector2 lookPosition    = position + VectorExtensions.AngleToUnitVector(Entity.Body.Rotation) * SensingDistance;
            var     debugShapeColor = SensedEntity != null ? Color.Aqua : Color.FloralWhite;

            renderer.DebugDrawLine(position, lookPosition, color: debugShapeColor);

            if (SensedEntity != null)
            {
                Vector2 positionInWorldCoords = Point;
                renderer.DebugDrawPoint(positionInWorldCoords, debugShapeColor);
                renderer.DebugDrawLine(positionInWorldCoords, positionInWorldCoords + Normal, color: debugShapeColor);
            }
        }
 public void DebugDraw(DebugRenderer renderer, float elapsedSeconds, float totalSeconds)
 {
     renderer.DebugDrawPoint(dashCollisionPoint, Color.PaleVioletRed);
     renderer.DebugDrawLine(dashCollisionPoint, dashCollisionPoint + dashCollisionDirection, color: Color.PaleVioletRed);
 }