wgl 6 달 전
부모
커밋
34c8b94923
1개의 변경된 파일5개의 추가작업 그리고 19개의 파일을 삭제
  1. 5 19
      ActionTowerDefense/Assets/Scripts/Tower/EnemyTower.cs

+ 5 - 19
ActionTowerDefense/Assets/Scripts/Tower/EnemyTower.cs

@@ -128,25 +128,11 @@ public class EnemyTower : Character
 
     public override void BeHit(int damage)
     {
-        hp -= damage;
-
-        //É˺¦Ìø×Ö
-        if (showInjuryNum)
-        {
-            GameObject injuryNum = Instantiate(injuryNumText);
-            injuryNum.transform.position = new Vector3(transform.position.x + Random.Range(-1f, 1f), transform.position.y + 1, transform.position.z);
-            TextMeshProUGUI text = injuryNum.GetComponentInChildren<TextMeshProUGUI>();
-            text.text = damage.ToString();
-            if (gameObject.CompareTag("Player"))
-            {
-                text.color = Color.red;
-            }
-        }
+        base.BeHit(damage);
+    }
 
-        uiHp.Show(hp, totalHp);
-        if (hp <= 0)
-        {
-            ChangeState(CharacterState.Die);
-        }
+    public override void BeHit(AttackInfo attackInfo, float dir)
+    {
+        base.BeHit(attackInfo, dir);
     }
 }