using UnityEngine;

public class PlayerHealth : Health
{
    [SerializeField] private PlayerStat _pstat;

    void Start()
    {
        _pstat = GetComponent<PlayerStat>();
        currentHp = _pstat.MaxHp; // 스태틱 데이터를 가져와 초기화
    }

    public void TakeDamage(int damage)
    {
        ChangeHP(currentHp - Mathf.Clamp(damage,0,currentHp));
    }
}
