示例#1
0
 public void Damage()
 {
     Debug.Log("Player damage");
     life_score -= 10;
     healthBar.TakeDamage(10);
     if (life_score <= 0)
     {
         StartCoroutine(Die());
     }
 }
示例#2
0
 public void Damage()
 {
     Debug.Log("Enemy damage");
     life_score -= 30;
     healthBar.TakeDamage(30);
     if (life_score <= 0)
     {
         StartCoroutine(Die());
     }
 }
示例#3
0
 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);
     }
 }