From f57e3851e1535b15af2b62566de56dcad6fc3395 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=82=B0?= Date: Tue, 2 Sep 2025 10:31:34 +0900 Subject: [PATCH] =?UTF-8?q?CustomerPatienceUiComponent=20=EC=88=98?= =?UTF-8?q?=EC=A0=95:=20Busy=20=EC=83=81=ED=83=9C=20=EC=A7=80=EC=9B=90=20?= =?UTF-8?q?=EB=A1=9C=EC=A7=81=20=EB=B3=80=EA=B2=BD,=20RemainingPatienceTim?= =?UTF-8?q?e=20=EA=B3=84=EC=82=B0=20=EB=B0=A9=EC=8B=9D=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD.=20CustomerDefault.asset=20=EB=B0=8F=20ExitMarker=20?= =?UTF-8?q?=EC=9C=84=EC=B9=98=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AI/Customer/Subtree/CustomerDefault.asset | 4 ++-- .../_Addressables/Scenes/Restaurant.unity | 2 +- .../Restaurant/Character/Npc/NpcMovement.cs | 4 ++-- .../Ui/OrderUi/CustomerPatienceUiComponent.cs | 23 +++++++++++++++---- 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/Assets/_DDD/_Addressables/AI/Customer/Subtree/CustomerDefault.asset b/Assets/_DDD/_Addressables/AI/Customer/Subtree/CustomerDefault.asset index cb8b3e3bc..d514b9496 100644 --- a/Assets/_DDD/_Addressables/AI/Customer/Subtree/CustomerDefault.asset +++ b/Assets/_DDD/_Addressables/AI/Customer/Subtree/CustomerDefault.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bfe3603b8b9888eea90a7e616293d71236f6e76d4ebd188e5946d2bfd776d368 -size 65042 +oid sha256:51ffdb603bb33bff6ff7259dea82e285484ac0420e550b451aa8aa30eb50696d +size 65148 diff --git a/Assets/_DDD/_Addressables/Scenes/Restaurant.unity b/Assets/_DDD/_Addressables/Scenes/Restaurant.unity index 9cd910ad9..8fc613350 100644 --- a/Assets/_DDD/_Addressables/Scenes/Restaurant.unity +++ b/Assets/_DDD/_Addressables/Scenes/Restaurant.unity @@ -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 diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/Npc/NpcMovement.cs b/Assets/_DDD/_Scripts/Restaurant/Character/Npc/NpcMovement.cs index 3cf2c19c0..1af380f21 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Character/Npc/NpcMovement.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Character/Npc/NpcMovement.cs @@ -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) diff --git a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/CustomerPatienceUiComponent.cs b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/CustomerPatienceUiComponent.cs index b9f5ef44a..d72b2ba26 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/CustomerPatienceUiComponent.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/CustomerPatienceUiComponent.cs @@ -74,12 +74,27 @@ private void Update() { SetPatience(); } - _patienceSlider.maxValue = _blackboard.GetBlackboardValue(RestaurantCustomerBlackboardKey.MaxPatienceTime); - _patienceSlider.value = _blackboard.GetBlackboardValue(RestaurantCustomerBlackboardKey.RemainingPatienceTime); - if (_patienceSlider.value <= 0) + if (_currentOrderType == RestaurantOrderType.Busy) { - _patienceSlider.gameObject.SetActive(false); + _patienceSlider.maxValue = _blackboard.GetBlackboardValue(RestaurantCustomerBlackboardKey.MaxPatienceTime); + var remainingTime = _blackboard.GetBlackboardValue(RestaurantCustomerBlackboardKey.RemainingPatienceTime); + _patienceSlider.value = _patienceSlider.maxValue - remainingTime; + + if (_patienceSlider.value >= _patienceSlider.maxValue) + { + _patienceSlider.gameObject.SetActive(false); + } + } + else + { + _patienceSlider.maxValue = _blackboard.GetBlackboardValue(RestaurantCustomerBlackboardKey.MaxPatienceTime); + _patienceSlider.value = _blackboard.GetBlackboardValue(RestaurantCustomerBlackboardKey.RemainingPatienceTime); + + if (_patienceSlider.value <= 0) + { + _patienceSlider.gameObject.SetActive(false); + } } }