From 432e8d9f53c24db5aca2ec19a6b331dda30d69b9 Mon Sep 17 00:00:00 2001
From: Raylouis <sebastianraynard@gmail.com>
Date: Sat, 11 May 2024 14:07:12 +0700
Subject: [PATCH] [FIX] shop collider detection

---
 Assets/Scripts/Player/ShopColliderDetection.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Assets/Scripts/Player/ShopColliderDetection.cs b/Assets/Scripts/Player/ShopColliderDetection.cs
index 89ecd76..1f9346d 100644
--- a/Assets/Scripts/Player/ShopColliderDetection.cs
+++ b/Assets/Scripts/Player/ShopColliderDetection.cs
@@ -14,7 +14,7 @@ public class ColliderChecker : MonoBehaviour
         // Check if the targetObject is within the collider of this GameObject
         if (!GetComponent<Collider>().bounds.Intersects(shopKeeper.GetComponent<SphereCollider>().bounds))
         {
-            if (Input.GetKeyDown(KeyCode.Z) && !saveRadius.playerInRange)
+            if ((Input.GetKeyDown(KeyCode.Z) || Input.GetButton("X Button")) && Time.timeScale == 1 && !saveRadius.playerInRange)
             {
                 StartCoroutine(ErrorMessage());
             }
-- 
GitLab