private void OnTriggerEnter2D(Collider2D collision) { if (ai.Ai_Trigger(collision)) { anim.SetBool("hit", true); } }
private void OnTriggerEnter2D(Collider2D collision) { if (ai.Ai_Trigger(collision)) { GetComponent <Animator>().SetBool("hit", true); } }
private void OnTriggerEnter2D(Collider2D collision) { if (!isDie && !isFirstHit && collision.gameObject.CompareTag("PlayerFoot")) { FindObjectOfType <AudioManager>().Play("Enemy Death"); collision.transform.parent.GetComponent <PlayerController>().JumpPlayer(); isFirstHit = true; isDie = true; return; } else if (ai.Ai_Trigger(collision)) { anim.SetBool("isDie", true); isDie = true; enabled = false; } }
private void OnTriggerEnter2D(Collider2D collision) { if (!isDie && ai.Ai_Trigger(collision, GreenDie)) { isDie = true; if (!GreenDie) { GreenDie = true; ai.SetEnemyDie(false); anim.SetTrigger("hit"); ai.speed *= angrySpeed; ai.SetTime(0); } else { anim.SetBool("isDie", true); } } }