Skip to content
Snippets Groups Projects
Commit 432e8d9f authored by Raylouis's avatar Raylouis
Browse files

[FIX] shop collider detection

parent 9518d1d0
No related merge requests found
...@@ -14,7 +14,7 @@ public class ColliderChecker : MonoBehaviour ...@@ -14,7 +14,7 @@ public class ColliderChecker : MonoBehaviour
// Check if the targetObject is within the collider of this GameObject // Check if the targetObject is within the collider of this GameObject
if (!GetComponent<Collider>().bounds.Intersects(shopKeeper.GetComponent<SphereCollider>().bounds)) 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()); StartCoroutine(ErrorMessage());
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment