From 61a3aec8b37541bb4cba5cc1003cf33436458c0f Mon Sep 17 00:00:00 2001 From: Saul Sayers <saulsayers@gmail.com> Date: Sat, 15 Apr 2023 12:23:14 +0700 Subject: [PATCH] fix: openShopkeeper kalau jeda aja --- Assets/Scripts/Managers/ShopKeeperManager.cs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Assets/Scripts/Managers/ShopKeeperManager.cs b/Assets/Scripts/Managers/ShopKeeperManager.cs index 794dc7f..fb36cb9 100644 --- a/Assets/Scripts/Managers/ShopKeeperManager.cs +++ b/Assets/Scripts/Managers/ShopKeeperManager.cs @@ -30,15 +30,17 @@ public class ShopKeeperManager : MonoBehaviour float distance = Vector3.Distance(shopKeeper.transform.position, player.transform.position); bool isPressedTab = Input.GetKeyDown(KeyCode.Tab); - if (distance < 7.5 && JedaManager.isJeda) { - if (isPressedTab) { - ShowShopKeeper(); + if (JedaManager.isJeda){ + if (distance < 7.5) { + if (isPressedTab) { + ShowShopKeeper(); + } else { + NotificationManager.ShowNotification("Press Tab to open the Shopkeeper!!", 0.2f); + } } else { - NotificationManager.ShowNotification("Press Tab to open the Shopkeeper!!", 0.2f); - } - } else { - if (isPressedTab) { - NotificationManager.ShowNotification("Go to the Dollhouse to open the shopkeeper!!", 2.0f); + if (isPressedTab) { + NotificationManager.ShowNotification("Go to the Dollhouse to open the shopkeeper!!", 2.0f); + } } } } -- GitLab