35 lines
655 B
C#
35 lines
655 B
C#
using Battle;
|
|
|
|
namespace Units
|
|
{
|
|
public class Minion : Unit
|
|
{
|
|
private int _minionAtk;
|
|
private int _minionMaxHP;
|
|
|
|
protected override void Init()
|
|
{
|
|
MaxHP = _minionMaxHP;
|
|
Atk = GetAtkByGameTime();
|
|
}
|
|
|
|
protected override int GetAttackDamage(AttackType attackType)
|
|
{
|
|
//데미지 계산
|
|
|
|
return Atk;
|
|
}
|
|
|
|
protected override void OnDied()
|
|
{
|
|
//소멸
|
|
Destroy();
|
|
}
|
|
|
|
private int GetAtkByGameTime()
|
|
{
|
|
return _minionAtk * BattleManager.CurrentGameSeconds;
|
|
}
|
|
}
|
|
}
|