Esempio n. 1
0
        private void OnTriggerEnter(Collider other)
        {
            if (other.gameObject.CompareTag(interactableTag))
            {
                InteractionTrigger interAux = other.gameObject.GetComponent <InteractionTrigger>();

                if (interAux.autoReact)
                {
                    interAux.React();
                }
                else if (!interactionTriggersInRange.Exists(x => x.GetInstanceID() == interAux.GetInstanceID()))
                {
                    interactionTriggersInRange.Add(interAux);
                    Debug.Log("Interactable Added");
                }
            }
        }