private void Update() { if (inRange && !anim.GetCurrentAnimatorStateInfo(0).IsName("Enemy_attack") && !anim.GetBool("Death")) { enemyParent.Flip(); } }
private void Update() { if (inRange && !anim.GetCurrentAnimatorStateInfo(0).IsName("Skeleton_attack") && !anim.GetCurrentAnimatorStateInfo(0).IsName("Skeleton_rage")) { enemyParent.Flip(); } /* * if (anim.GetCurrentAnimatorStateInfo(0).IsName("Skeleton_death")) * { * this.enabled = false; * } */ if (enemyHealth.currentHealth <= 0) { this.enabled = false; } }