Ejemplo n.º 1
0
    void OnTriggerExit2D(Collider2D col)
    {
        if (col.gameObject.CompareTag("Box"))
        {
            if (boxOnTop.GetSlot() == this)
            {
                boxOnTop.SetSlot(null);
            }

            boxOnTop = null;
            Debug.Log("[BoxSlot] Box detached", this);

            foreach (var slotsObserver in observers)
            {
                slotsObserver.CalculateResult();
            }
        }
    }