First commit

This commit is contained in:
2026-06-29 19:26:37 +09:00
commit 9efb08fdf3
11 changed files with 338 additions and 0 deletions

44
Units/Champion.cs Normal file
View File

@@ -0,0 +1,44 @@
using Battle; // BattleManager.CurrentGameSeconds 참조
namespace Units
{
public class Champion : Unit
{
private int _championAtk;
private int _championMaxHP;
private int _reviveAt;
private int GetReviveDelay() => 5;
protected override void Init()
{
MaxHP = _championMaxHP;
Atk = _championAtk;
}
public override void Update()
{
if (_health.IsDead && BattleManager.CurrentGameSeconds >= _reviveAt)
Revive(); // 시간 도달 시 부활
}
protected override int GetAttackDamage(AttackType attackType)
{
//데미지 계산
return Atk;
}
protected override void OnDied()
{
_reviveAt = BattleManager.CurrentGameSeconds + GetReviveDelay(); // 예약
}
private void Revive()
{
_health.Revive();
//부활 지점에서 스폰 로직
}
}
}