public void Damage() { Debug.Log("Player damage"); life_score -= 10; healthBar.TakeDamage(10); if (life_score <= 0) { StartCoroutine(Die()); } }
public void Damage() { Debug.Log("Enemy damage"); life_score -= 30; healthBar.TakeDamage(30); if (life_score <= 0) { StartCoroutine(Die()); } }
public void Damage() { Debug.Log("Enemy damage"); life_score -= 30; healthBar.TakeDamage(30); if (life_score <= 0) { StartCoroutine(Die()); } if (life_score < 40) { isEscapeMode = true; Walk(); _navMeshAgent.SetDestination(escap_target.transform.position); } }