First commit
This commit is contained in:
44
Units/Tower.cs
Normal file
44
Units/Tower.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using Battle;
|
||||
|
||||
namespace Units
|
||||
{
|
||||
public class Tower : Unit
|
||||
{
|
||||
private int _towerAtk;
|
||||
private int _towerMaxHP;
|
||||
|
||||
public bool IsDestroyed { get; private set; } // 영구 파괴 여부
|
||||
|
||||
protected override void Init()
|
||||
{
|
||||
MaxHP = _towerMaxHP;
|
||||
Atk = _towerAtk;
|
||||
}
|
||||
|
||||
protected override int GetAttackDamage(AttackType attackType)
|
||||
{
|
||||
//데미지 계산
|
||||
|
||||
return Atk;
|
||||
}
|
||||
|
||||
protected override void OnDied()
|
||||
{
|
||||
//영구 파괴
|
||||
IsDestroyed = true;
|
||||
|
||||
StopFunction(); // 공격/타겟팅 등 기능 정지
|
||||
SwitchToWreckage(); // '파괴된 구조물' 잔해 비주얼로 전환 (파괴되었지만 구조물의 흔적은 남아있음)
|
||||
}
|
||||
|
||||
private void StopFunction()
|
||||
{
|
||||
// 공격·상호작용 비활성화
|
||||
}
|
||||
|
||||
private void SwitchToWreckage()
|
||||
{
|
||||
// 부서진 잔해로 모델 교체
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user