Exemplo n.º 1
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.tag == "Player")
        {
            itemAudioSource.PlayOneShot(useClip);

            baseHealth.RestoreHealth(baseHeal);
            Debug.Log("Base Heal");

            this.GetComponent <MeshCollider>().enabled = false;
            this.GetComponent <MeshRenderer>().enabled = false;

            Invoke("DestroyObject", 3f);
        }
    }