2026-04-02 타임라인 (진행중)
This commit is contained in:
@@ -121,6 +121,11 @@ private void Start()
|
||||
SetCursorLockState(true);
|
||||
}
|
||||
|
||||
public void PlayerStart()
|
||||
{
|
||||
Debug.Log("플레이 시작!!");
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
//캐릭터 컨트롤러는 FixedUpdate보다 Update에서 하는게 권장됨
|
||||
@@ -134,9 +139,6 @@ private void Update()
|
||||
|
||||
TickTimer();
|
||||
//PlayerDebug();
|
||||
|
||||
|
||||
Debug.Log($"InteractionTargetsCount : {InteractionTargets.Count}");
|
||||
}
|
||||
|
||||
private void FixedUpdate()
|
||||
|
||||
@@ -1,15 +1,34 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class PlayerHealth : Health
|
||||
{
|
||||
[SerializeField] PlayerStat _pstat;
|
||||
|
||||
public Image UI_HPBar { get; private set; }
|
||||
public Image UI_MPBar { get; private set; }
|
||||
public Image UI_StaminaBar { get; private set; }
|
||||
|
||||
public PlayerStat Pstat { get { return _pstat; } }
|
||||
|
||||
void Start()
|
||||
private void Awake()
|
||||
{
|
||||
_pstat = GetComponent<PlayerStat>();
|
||||
currentHp = _pstat.MaxHp; // 스태틱 데이터를 가져와 초기화
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
maxHp = _pstat.MaxHp;
|
||||
currentHp = _pstat.MaxHp;
|
||||
|
||||
UI_HPBar = GameManager.Instance.InGameUI.UserHealth.UI_HPBar;
|
||||
UI_MPBar = GameManager.Instance.InGameUI.UserHealth.UI_MPBar;
|
||||
UI_StaminaBar = GameManager.Instance.InGameUI.UserHealth.UI_StaminaBar;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
UI_HPBar.fillAmount = (float)currentHp / (float)maxHp;
|
||||
}
|
||||
|
||||
public void TakeDamage(int damage)
|
||||
|
||||
Reference in New Issue
Block a user