Example #1
0
        private void OnObjectInBeamDisabled(GameObject obj)
        {
            ObjectsInBeam.Remove(obj);

            if (ObjectsInBeam.Count == 0)
            {
                SetLaserPointerCol(laserPointerNoItemsCol);
            }
        }
Example #2
0
        private void OnTriggerExit(Collider other)
        {
            ObjectsInBeam.Remove(other.gameObject);

            if (ObjectsInBeam.Count == 0)
            {
                SetLaserPointerCol(laserPointerNoItemsCol);
            }

            NotifyOnDisable disableNotifier = other.gameObject.GetComponent <NotifyOnDisable>();

            if (disableNotifier != null)
            {
                disableNotifier.OnObjectDisabled -= OnObjectInBeamDisabled;
            }
        }