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();
         }
     }
 }
Exemplo n.º 2
0
 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();
         }
     }
 }