2026-03-30 아이템 사용 진행중

This commit is contained in:
2026-03-30 18:01:09 +09:00
parent d833da5bfa
commit f8773fa168
33 changed files with 613 additions and 8 deletions

View File

@@ -2,17 +2,16 @@
public class PlayerHealth : Health
{
private PlayerStat _pstat;
public int currentHp;
[SerializeField] private PlayerStat _pstat;
void Start()
{
_pstat = GetComponent<PlayerStat>();
//currentHp = _pstat.MaxHp; // 스태틱 데이터를 가져와 초기화
currentHp = _pstat.MaxHp; // 스태틱 데이터를 가져와 초기화
}
public void TakeDamage(int damage)
{
ChangeHP(currentHp - Mathf.Clamp(damage,0,currentHp));
}
}