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); } } }