Ejemplo n.º 1
0
    private void OnTriggerExit(Collider other)
    {
        UVLightController uvController = other.gameObject.GetComponent <UVLightController>();

        if (uvController)
        {
            m_LightsOnReceiver[(int)uvController.GetLightColor()]--;
            if (!isTriggered() && m_isOn)
            {
                DeactivateObjects();
            }
        }
    }
Ejemplo n.º 2
0
    private void OnTriggerEnter(Collider other)
    {
        UVLightController uvController = other.gameObject.GetComponent <UVLightController>();

        if (uvController)
        {
            m_LightsOnReceiver[(int)uvController.GetLightColor()]++;
            if (isTriggered() && !m_isOn)
            {
                ActivateObjects();
            }
        }
    }