void OnTriggerEnter(Collider other) { if (other.CompareTag("Player") && !_founded) { Material mat = _renderer.material; mat.SetColor("_EmissionColor", Color.green); _pointLight.enabled = true; Debug.Log(other.gameObject.name); PlayerBehaviour pB = other.gameObject.GetComponent <PlayerBehaviour>(); pB.BaseFounded(); pB.Heal(); _founded = true; } }