Ejemplo n.º 1
0
    private void DrawBoundingBoxes(Transform transform, Skeleton skeleton, float _collisionSize)
    {
        int count = 1;

        ExposedList <Slot> .Enumerator enmerator = skeleton.slots.GetEnumerator();
        while (enmerator.MoveNext())
        {
            BoundingBoxAttachment bba = enmerator.Current.Attachment as BoundingBoxAttachment;
            if (bba != null)
            {
                Vector2[] boxArray = DrawBoundingBox(enmerator.Current, bba, transform, _collisionSize);
                if (boxArray != null)
                {
                    m_meshCollider.pathCount = count;
                    m_meshCollider.SetPath(count - 1, boxArray);
                    count++;
                }
            }
        }
    }