|
|
@@ -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);
|
|
|
}
|
|
|
}
|