private void OnTriggerEnter(Collider other) { if (other.CompareTag("Lightsaber")) { if (actionScript != null) { actionScript.setActionFreeze(); } } else if (other.CompareTag("Player")) { if (actionScript.isAttackPosture()) { other.GetComponent <PlayerController>().Death(); } } }
private void OnTriggerEnter(Collider other) { if (other.CompareTag("Lightsaber")) { if (actionScript != null) { actionScript.setActionFreeze(); } } else if (other.CompareTag("Enemy")) { if (actionScript.isAttackPosture()) { other.gameObject.transform.parent.gameObject.GetComponent <EnemyController>().Death(); } } }