예제 #1
0
 public void Hit(float dmg)
 {
     curHp -= (int)dmg;
     if (curHp <= 0)
     {
         curHp = 0;
         enemyManager.deathCount++;
         enemyManager.RenewScore();
         enemyHpBar.SetHpBar((float)curHp / hp);
         op.Disable(gameObject);
     }
     enemyHpBar.SetHpBar((float)curHp / hp);
 }
예제 #2
0
 protected void UpdateHud()
 {
     if (enemyHpBar != null)
     {
         enemyHpBar.SetHpBar((float)hp, (float)hpMax);
     }
 }