예제 #1
0
    private void IgnoreCollision(Label other, bool ignore)
    {
        if (ignore && other == delayedEnableCollisionLabel)
        {
            delayedEnableCollisionLabel = null;
        }

        var colliders1 = placeable.GetCollidersBuff1();
        var colliders2 = other.GetCollidersBuff2();

        foreach (var c1 in colliders1)
        {
            if (c1.enabled)
            {
                foreach (var c2 in colliders2)
                {
                    if (c2.enabled)
                    {
                        Physics.IgnoreCollision(c2, c1, ignore);
                    }
                }
            }
        }

        colliders1.Clear();
        colliders2.Clear();
    }