사망 시 체력바가 사라지지 않는 문제 수정
This commit is contained in:
@@ -170,12 +170,16 @@ namespace Northbound
|
|||||||
|
|
||||||
private void LateUpdate()
|
private void LateUpdate()
|
||||||
{
|
{
|
||||||
// 타겟을 따라 이동 (회전은 하지 않음)
|
// 타겟이 파괴되면 체력바도 파괴
|
||||||
if (_targetTransform != null)
|
if (_targetTransform == null)
|
||||||
{
|
{
|
||||||
transform.position = _targetTransform.position + Vector3.up * heightOffset;
|
Destroy(gameObject);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 타겟을 따라 이동 (회전은 하지 않음)
|
||||||
|
transform.position = _targetTransform.position + Vector3.up * heightOffset;
|
||||||
|
|
||||||
// 체력이 가득 차면 숨김
|
// 체력이 가득 차면 숨김
|
||||||
if (hideWhenFull && barContainer != null && _healthProvider != null && _initialized)
|
if (hideWhenFull && barContainer != null && _healthProvider != null && _initialized)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user