private void OnTriggerExit(Collider other) { PartTrigger ct = other.attachedRigidbody.gameObject.GetComponent <PartTrigger>(); if (ct != null) { rockTrigger = false; } }
private void OnTriggerExit(Collider other) { PartTrigger ct = other.attachedRigidbody.gameObject.GetComponent <PartTrigger>(); if (ct != null) { anim.SetBool("hasCollider", false); lightSource.enabled = false; transform.parent.tag = "Untagged"; } }
private void OnTriggerEnter(Collider other) { PartTrigger ct = other.attachedRigidbody.gameObject.GetComponent <PartTrigger>(); if (ct != null) { anim.SetBool("hasCollider", true); ct.triggerPart(); if (collider != null) { collider.enabled = false; } lightSource.enabled = true; if (transform.parent != null) { transform.parent.tag = "Untagged"; } } }