CustomerPatienceUiComponent 수정: Busy 상태 지원 로직 변경, RemainingPatienceTime 계산 방식 변경. CustomerDefault.asset 및 ExitMarker 위치 업데이트

This commit is contained in:
김산 2025-09-02 10:31:34 +09:00
parent bef345610e
commit f57e3851e1
4 changed files with 24 additions and 9 deletions

Binary file not shown.

View File

@ -1581,7 +1581,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 3697702677815423220, guid: 186d28777ccbc484780568f74c110ff7, type: 3}
propertyPath: m_LocalPosition.z
value: 3.2
value: 4.5
objectReference: {fileID: 0}
- target: {fileID: 3697702677815423220, guid: 186d28777ccbc484780568f74c110ff7, type: 3}
propertyPath: m_LocalRotation.w

View File

@ -85,7 +85,7 @@ public Vector3 GetRandomBetweenTwoPoints(Vector2? normalizedRange = null)
public bool TryTeleportToPosition(Vector3 position)
{
if (IsPositionMovable(position) == false)
if (!IsPositionMovable(position))
{
Debug.LogWarning($"{gameObject.name}오브젝트가 이동 불가능한 위치로 텔레포트 시도됨");
return false;
@ -97,7 +97,7 @@ public bool TryTeleportToPosition(Vector3 position)
public bool HasReachedDestination()
{
return _iAstarAi.pathPending == false && _iAstarAi.reachedDestination;
return !_iAstarAi.pathPending && _iAstarAi.reachedDestination;
}
public bool IsPositionMovable(Vector3 endPosition)

View File

@ -74,6 +74,20 @@ private void Update()
{
SetPatience();
}
if (_currentOrderType == RestaurantOrderType.Busy)
{
_patienceSlider.maxValue = _blackboard.GetBlackboardValue<float>(RestaurantCustomerBlackboardKey.MaxPatienceTime);
var remainingTime = _blackboard.GetBlackboardValue<float>(RestaurantCustomerBlackboardKey.RemainingPatienceTime);
_patienceSlider.value = _patienceSlider.maxValue - remainingTime;
if (_patienceSlider.value >= _patienceSlider.maxValue)
{
_patienceSlider.gameObject.SetActive(false);
}
}
else
{
_patienceSlider.maxValue = _blackboard.GetBlackboardValue<float>(RestaurantCustomerBlackboardKey.MaxPatienceTime);
_patienceSlider.value = _blackboard.GetBlackboardValue<float>(RestaurantCustomerBlackboardKey.RemainingPatienceTime);
@ -82,6 +96,7 @@ private void Update()
_patienceSlider.gameObject.SetActive(false);
}
}
}
private void SetPatience()
{